結果
| 問題 |
No.2185 平方数の下6桁
|
| コンテスト | |
| ユーザー |
FplusFplusF
|
| 提出日時 | 2023-01-13 21:30:29 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1,982 ms / 2,000 ms |
| コード長 | 865 bytes |
| コンパイル時間 | 1,774 ms |
| コンパイル使用メモリ | 194,148 KB |
| 最終ジャッジ日時 | 2025-02-10 02:07:31 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0;i<(long long)(n);i++)
#define all(v) v.begin(),v.end()
using ll=long long;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll,ll>;
const ll INF=(1ll<<60);
template<class T> void chmin(T &a,T b){
if(a>b){
a=b;
}
}
template<class T> void chmax(T &a,T b){
if(a<b){
a=b;
}
}
int main(){
auto start=chrono::system_clock::now();
ll i=1000;
string s;
cin >> s;
while(true){
auto now=chrono::system_clock::now();
auto msec=chrono::duration_cast<chrono::milliseconds>(now-start).count();
if(1980<=msec){
cout << "NO" << endl;
return 0;
}
string t=to_string(i*i);
if(t.substr(t.size()-6,6)==s){
cout << "YES" << endl;
return 0;
}
i++;
}
}
FplusFplusF