#include <string>
#include <vector>
#include <math.h>
#include <iostream>
using namespace std;
 
long long solution(long long n) 
{
    long long answer;
    long long root = sqrt(n);
    
    // sqrt는 정수형만 반환
    if(root*root == n)
    {
        answer = pow(root+12.0);
    }
    else
    {
        answer = -1;
    }
 
    return answer;
}
cs

+ Recent posts