結果

問題 No.312 置換処理
ユーザー ynyn
提出日時 2015-12-05 00:16:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 1,765 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 88,912 KB
最終ジャッジ日時 2023-10-12 14:56:13
合計ジャッジ時間 7,362 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
88,508 KB
testcase_01 WA -
testcase_02 AC 123 ms
88,640 KB
testcase_03 WA -
testcase_04 AC 117 ms
88,388 KB
testcase_05 AC 119 ms
88,332 KB
testcase_06 AC 121 ms
88,608 KB
testcase_07 AC 123 ms
88,896 KB
testcase_08 AC 119 ms
88,512 KB
testcase_09 AC 118 ms
88,628 KB
testcase_10 AC 117 ms
88,516 KB
testcase_11 AC 120 ms
88,612 KB
testcase_12 AC 119 ms
88,668 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 118 ms
88,636 KB
testcase_23 AC 121 ms
88,740 KB
testcase_24 AC 118 ms
88,464 KB
testcase_25 AC 118 ms
88,616 KB
testcase_26 AC 118 ms
88,468 KB
testcase_27 WA -
testcase_28 AC 115 ms
88,484 KB
testcase_29 AC 120 ms
88,516 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 122 ms
88,568 KB
testcase_33 AC 123 ms
88,596 KB
testcase_34 AC 132 ms
88,584 KB
testcase_35 AC 119 ms
88,664 KB
testcase_36 AC 118 ms
88,472 KB
testcase_37 AC 116 ms
88,428 KB
testcase_38 WA -
testcase_39 AC 117 ms
88,556 KB
testcase_40 AC 118 ms
88,648 KB
testcase_41 AC 121 ms
88,464 KB
testcase_42 AC 117 ms
88,576 KB
testcase_43 AC 116 ms
88,452 KB
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
nn = 10**6
num = [2]
table = [True] * (nn + 1)

for i in range(2, nn + 1):
    if not table[i]:
        continue
    k = i + i
    while k < nn + 1:
        table[k] = False
        k += i

    num.append(i)

for i in num:
    if i == 2:
        continue
    if n % i == 0:
        print(i)
        exit()
print(n)
0