結果
問題 | No.2185 平方数の下6桁 |
ユーザー |
![]() |
提出日時 | 2023-01-13 21:45:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 28 ms / 2,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 3,267 ms |
コンパイル使用メモリ | 247,476 KB |
最終ジャッジ日時 | 2025-02-10 02:23:37 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 |
ソースコード
#include <bits/extc++.h> using namespace std; using ll = long long; #define REP(i,n) for(int i=0;i<int(n);i++) #define FOR(i,a,b) for(int i=a;i<=int(b);i++) #define ALL(x) x.begin(),x.end() #define INFL LLONG_MAX signed main() { string s; cin >> s; for(ll i=1; i<=2e6; i++) { ll ch = i*i; if(ch < 1e6) continue; bool ok = true; REP(j, 6) { if(ch % 10 != s[5-j] - '0') ok = false; ch /= 10; } if(ok) { cout << "YES"; return 0; } } cout << "NO"; return 0; }