提交时间:2024-02-23 17:44:12

运行 ID: 41983

#include <iostream> #include <math.h> using namespace std; int main(int argc, char *argv[]){ long long n; cin >> n; if(n < 0) { cout << 0; return 0; } if(long(sqrt(n)) == sqrt(n)) cout << n; else{ long long num = int(sqrt(n))+1; long long a = num * num; cout << a; } return 0; }