기본 콘텐츠로 건너뛰기

라벨이 Hackerrank인 게시물 표시

Hackerrank_security-tutorial-functions2

Hackerrank_security-tutorial-functions2 Hackerrank - Security Security Functions 2 Problem Security Functions 2 또한 Security Concept 문제 시작에 앞서 워밍업을 위한 문제이다. 제곱 연산한 결과를 반환하는 함수를 작성하면 된다. 문제 보러 가기 Solution # include <math.h> /* * Complete the function below. */ int function ( int x ) { return pow ( x , 2 ) ; }

Hackerrank_security-tutorial-functions

Hackerrank_security-tutorial-functions Hackerrank - Security Security Functions Problem Security Concept 문제 시작에 앞서 워밍업을 위한 문제이다. 11로 나머지 연산한 결과를 반환하는 함수를 작성하면 된다. 문제 보러 가기 Solution # include <bits/stdc++.h> using namespace std ; int calculate ( int x ) { return x % 11 ; } int main ( ) { int x ; cin >> x ; int result = calculate ( x ) ; cout << result << endl ; return 0 ; }