結果

問題 No.2185 平方数の下6桁
ユーザー daiota
提出日時 2023-01-14 10:44:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 1,719 ms
コンパイル使用メモリ 166,048 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-25 16:29:15
合計ジャッジ時間 2,831 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)


int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	ll i,j,k;

	string s;
	cin >> s;

	ll m=stoll(s);
	for(i=0;i<1000000;i++){
		ll x=i*i;
		if(x%1000000==m){
			cout << "YES" << endl;
			return 0;
		}

	}

	cout << "NO" << endl;

	return 0;
}
0