結果

問題 No.2185 平方数の下6桁
ユーザー floraflora
提出日時 2023-01-13 21:45:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 519 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 938 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 76,812 KB
最終ジャッジ日時 2023-08-26 03:26:49
合計ジャッジ時間 11,830 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,480 KB
testcase_01 AC 62 ms
71,052 KB
testcase_02 AC 484 ms
76,588 KB
testcase_03 AC 62 ms
71,200 KB
testcase_04 AC 487 ms
76,576 KB
testcase_05 AC 492 ms
76,524 KB
testcase_06 AC 491 ms
76,540 KB
testcase_07 AC 63 ms
71,400 KB
testcase_08 AC 494 ms
76,688 KB
testcase_09 AC 61 ms
71,480 KB
testcase_10 AC 493 ms
76,584 KB
testcase_11 AC 64 ms
71,400 KB
testcase_12 AC 482 ms
76,452 KB
testcase_13 AC 70 ms
71,372 KB
testcase_14 AC 519 ms
76,348 KB
testcase_15 AC 71 ms
75,892 KB
testcase_16 AC 67 ms
76,348 KB
testcase_17 AC 66 ms
71,408 KB
testcase_18 AC 512 ms
76,348 KB
testcase_19 AC 71 ms
76,304 KB
testcase_20 AC 499 ms
76,584 KB
testcase_21 AC 501 ms
76,628 KB
testcase_22 AC 77 ms
76,252 KB
testcase_23 AC 505 ms
76,520 KB
testcase_24 AC 70 ms
76,256 KB
testcase_25 AC 485 ms
76,688 KB
testcase_26 AC 484 ms
76,596 KB
testcase_27 AC 83 ms
76,168 KB
testcase_28 AC 74 ms
76,108 KB
testcase_29 AC 77 ms
76,104 KB
testcase_30 AC 488 ms
76,364 KB
testcase_31 AC 485 ms
76,760 KB
testcase_32 AC 71 ms
76,176 KB
testcase_33 AC 66 ms
76,140 KB
testcase_34 AC 490 ms
76,580 KB
testcase_35 AC 499 ms
76,812 KB
testcase_36 AC 67 ms
76,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()

#平方する前の値をXとすると下6桁の部分になるのはX=1000*a+100*b+10*c+dみたいな感じで書いて計算するとわかるが、
#10^6の桁までである。よってここまで全探索してなければなし
for x in range(10**7):
    if str(x**2).zfill(6).endswith(S):
        print("YES")
        exit()

print("NO")
0