結果

問題 No.2185 平方数の下6桁
ユーザー zezerozezero
提出日時 2023-01-13 22:09:25
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 643 ms
コンパイル使用メモリ 81,168 KB
実行使用メモリ 7,212 KB
最終ジャッジ日時 2023-08-26 03:54:28
合計ジャッジ時間 8,386 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 156 ms
7,004 KB
testcase_01 AC 156 ms
7,108 KB
testcase_02 AC 154 ms
7,008 KB
testcase_03 AC 152 ms
7,024 KB
testcase_04 AC 152 ms
7,020 KB
testcase_05 AC 153 ms
7,000 KB
testcase_06 AC 153 ms
7,176 KB
testcase_07 AC 152 ms
7,088 KB
testcase_08 AC 152 ms
7,172 KB
testcase_09 AC 152 ms
7,040 KB
testcase_10 AC 152 ms
7,036 KB
testcase_11 AC 153 ms
7,208 KB
testcase_12 AC 155 ms
7,088 KB
testcase_13 AC 155 ms
7,180 KB
testcase_14 AC 154 ms
7,024 KB
testcase_15 AC 154 ms
7,212 KB
testcase_16 AC 155 ms
6,984 KB
testcase_17 AC 154 ms
6,992 KB
testcase_18 AC 159 ms
7,000 KB
testcase_19 AC 156 ms
7,040 KB
testcase_20 AC 157 ms
7,004 KB
testcase_21 AC 157 ms
7,008 KB
testcase_22 AC 155 ms
7,008 KB
testcase_23 AC 157 ms
7,120 KB
testcase_24 AC 155 ms
7,120 KB
testcase_25 AC 157 ms
7,088 KB
testcase_26 AC 156 ms
7,120 KB
testcase_27 AC 155 ms
7,024 KB
testcase_28 AC 154 ms
7,044 KB
testcase_29 AC 155 ms
7,084 KB
testcase_30 AC 151 ms
6,980 KB
testcase_31 AC 151 ms
7,088 KB
testcase_32 AC 153 ms
6,996 KB
testcase_33 AC 153 ms
6,988 KB
testcase_34 AC 155 ms
6,984 KB
testcase_35 AC 156 ms
6,996 KB
testcase_36 AC 156 ms
6,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <numeric>
#include <set>
using namespace std;
int main(){
	string s;
	cin >> s;
	set<long long> st;
	long long mod = 1000000;
	for (long long i = 1; i <= 1000000;i++){
		st.insert((i*i)%mod);
	}
	long long x = stoll(s);
	if (st.count(x)){
		cout << "YES\n";
	}
	else cout << "NO\n";
	
	
	return 0;
}

0