結果

問題 No.2185 平方数の下6桁
ユーザー sepa38sepa38
提出日時 2023-01-13 21:31:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 611 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 643 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 154,336 KB
最終ジャッジ日時 2023-08-26 03:07:00
合計ジャッジ時間 22,074 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 512 ms
154,008 KB
testcase_01 AC 522 ms
154,324 KB
testcase_02 AC 497 ms
154,028 KB
testcase_03 AC 512 ms
154,028 KB
testcase_04 AC 511 ms
154,188 KB
testcase_05 AC 530 ms
154,168 KB
testcase_06 AC 561 ms
154,012 KB
testcase_07 AC 511 ms
154,256 KB
testcase_08 AC 568 ms
154,252 KB
testcase_09 AC 545 ms
154,332 KB
testcase_10 AC 537 ms
154,164 KB
testcase_11 AC 521 ms
154,164 KB
testcase_12 AC 528 ms
154,212 KB
testcase_13 AC 523 ms
154,008 KB
testcase_14 AC 510 ms
153,992 KB
testcase_15 AC 502 ms
154,204 KB
testcase_16 AC 497 ms
153,992 KB
testcase_17 AC 530 ms
154,256 KB
testcase_18 AC 589 ms
154,172 KB
testcase_19 AC 524 ms
154,260 KB
testcase_20 AC 542 ms
154,028 KB
testcase_21 AC 565 ms
154,180 KB
testcase_22 AC 532 ms
154,180 KB
testcase_23 AC 550 ms
154,024 KB
testcase_24 AC 518 ms
154,020 KB
testcase_25 AC 528 ms
154,248 KB
testcase_26 AC 510 ms
154,204 KB
testcase_27 AC 513 ms
154,004 KB
testcase_28 AC 530 ms
154,016 KB
testcase_29 AC 535 ms
154,252 KB
testcase_30 AC 526 ms
154,004 KB
testcase_31 AC 545 ms
154,168 KB
testcase_32 AC 531 ms
153,992 KB
testcase_33 AC 611 ms
154,012 KB
testcase_34 AC 547 ms
154,160 KB
testcase_35 AC 548 ms
154,168 KB
testcase_36 AC 526 ms
154,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

lim = 10 ** 7
flg = [0] * lim
flg[0] = 1
for i in range(lim):
  if flg[i]:
    continue
  while True:
    i = (i ** 2) % lim
    if flg[i]:
      break
    flg[i] = 1
s = int(input())
print("YES" if flg[s] else "NO")
0