結果
問題 |
No.2185 平方数の下6桁
|
ユーザー |
|
提出日時 | 2023-01-13 21:45:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 581 bytes |
コンパイル時間 | 1,803 ms |
コンパイル使用メモリ | 165,924 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 16:59:41 |
合計ジャッジ時間 | 3,021 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, s, n) for (int i = s; i < (int)(n); i++) #define ALL(x) (x).begin(), (x).end() #define INF 1001001001 #define MOD 1000000007 using ll = long long; using vi = vector<int>; int main() { int a; cin >> a; bool yes = false; for (ll i = 0; i < 1000000; i++) { ll x = i*i; if (x % 1000000 == a) { // cout << i << endl; yes = true; } } if (yes) cout << "YES" << endl; else cout << "NO" << endl; }