結果
問題 |
No.2185 平方数の下6桁
|
ユーザー |
![]() |
提出日時 | 2023-01-13 21:22:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 1,773 ms |
コンパイル使用メモリ | 166,720 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 16:19:25 |
合計ジャッジ時間 | 2,936 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; int A = stoi(S); bool ok = false; for (int i = 0; i < 1000000; i++){ if ((long long) i * i % 1000000 == A){ ok = true; } } if (ok){ cout << "YES" << endl; } else { cout << "NO" << endl; } }