結果

問題 No.312 置換処理
ユーザー ynyn
提出日時 2015-12-05 00:11:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 19,224 KB
最終ジャッジ日時 2023-10-12 14:53:27
合計ジャッジ時間 40,352 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 836 ms
19,148 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 779 ms
19,020 KB
testcase_05 AC 843 ms
19,036 KB
testcase_06 AC 861 ms
19,096 KB
testcase_07 AC 870 ms
19,028 KB
testcase_08 AC 797 ms
19,076 KB
testcase_09 AC 885 ms
19,016 KB
testcase_10 AC 816 ms
19,052 KB
testcase_11 AC 806 ms
18,988 KB
testcase_12 AC 836 ms
19,004 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 876 ms
19,040 KB
testcase_23 WA -
testcase_24 AC 875 ms
19,016 KB
testcase_25 AC 828 ms
19,176 KB
testcase_26 AC 796 ms
19,028 KB
testcase_27 WA -
testcase_28 AC 862 ms
18,964 KB
testcase_29 AC 847 ms
19,004 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 858 ms
19,008 KB
testcase_36 AC 851 ms
19,088 KB
testcase_37 AC 817 ms
19,056 KB
testcase_38 WA -
testcase_39 AC 833 ms
19,012 KB
testcase_40 AC 827 ms
19,000 KB
testcase_41 AC 819 ms
18,968 KB
testcase_42 AC 768 ms
19,008 KB
testcase_43 AC 793 ms
19,048 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()
0