提交时间:2024-05-18 15:00:01

运行 ID: 147390

#include <iostream> #include <cmath> using namespace std; bool f(double s) { int n = s; if(s != n) return false; return true; } int main() { ios::sync_with_stdio(0); int n; while(cin >> n) { double s = sqrt(n); if(f(s)) cout << 1 << '\n'; else cout << 0 << '\n'; } }