Problem
Problem URL : 정수 제곱근 판별
[1] Answer Code (18. 07. 24)
#include <cmath> // for : Use sqrt()
long long solution(long long n) {
long long answer = 0;
int ans = sqrt(n);
if( ans * ans == n )
answer = (ans+1) * (ans+1);
else
answer = -1;
return answer;
}