Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
41983 WZH 大等于n的最小完全平方数 C++ 通过 0 MS 244 KB 323 2024-02-23 17:44:12

Tests(1/1):


#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; }


测评信息: