結果

問題 No.1312 Snake Eyes
ユーザー KudeKude
提出日時 2020-12-09 07:20:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 81,636 KB
実行使用メモリ 74,660 KB
最終ジャッジ日時 2023-10-19 04:44:27
合計ジャッジ時間 8,240 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,324 KB
testcase_01 AC 39 ms
53,324 KB
testcase_02 AC 38 ms
53,324 KB
testcase_03 AC 37 ms
53,324 KB
testcase_04 AC 38 ms
53,324 KB
testcase_05 AC 37 ms
53,324 KB
testcase_06 AC 38 ms
53,324 KB
testcase_07 AC 37 ms
53,324 KB
testcase_08 AC 37 ms
53,324 KB
testcase_09 AC 38 ms
53,324 KB
testcase_10 AC 39 ms
53,324 KB
testcase_11 AC 38 ms
53,324 KB
testcase_12 AC 37 ms
53,324 KB
testcase_13 AC 38 ms
53,324 KB
testcase_14 AC 39 ms
53,324 KB
testcase_15 AC 39 ms
53,324 KB
testcase_16 AC 37 ms
53,324 KB
testcase_17 AC 38 ms
53,324 KB
testcase_18 AC 37 ms
53,324 KB
testcase_19 AC 38 ms
53,324 KB
testcase_20 AC 38 ms
53,324 KB
testcase_21 AC 38 ms
53,324 KB
testcase_22 AC 41 ms
57,076 KB
testcase_23 AC 42 ms
59,268 KB
testcase_24 AC 44 ms
61,384 KB
testcase_25 AC 43 ms
59,328 KB
testcase_26 AC 42 ms
59,328 KB
testcase_27 AC 56 ms
61,376 KB
testcase_28 AC 39 ms
53,324 KB
testcase_29 AC 44 ms
59,328 KB
testcase_30 AC 43 ms
59,328 KB
testcase_31 AC 44 ms
59,328 KB
testcase_32 AC 43 ms
59,328 KB
testcase_33 AC 46 ms
63,424 KB
testcase_34 AC 43 ms
59,336 KB
testcase_35 AC 46 ms
63,432 KB
testcase_36 AC 43 ms
59,328 KB
testcase_37 AC 43 ms
59,336 KB
testcase_38 AC 43 ms
59,328 KB
testcase_39 WA -
testcase_40 AC 55 ms
61,376 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 52 ms
69,576 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 96 ms
74,600 KB
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 AC 80 ms
74,600 KB
testcase_57 WA -
testcase_58 WA -
testcase_59 AC 67 ms
63,424 KB
testcase_60 WA -
testcase_61 WA -
testcase_62 AC 74 ms
65,472 KB
testcase_63 AC 42 ms
59,328 KB
testcase_64 AC 38 ms
53,324 KB
testcase_65 AC 40 ms
53,324 KB
testcase_66 AC 40 ms
57,076 KB
testcase_67 AC 38 ms
53,324 KB
testcase_68 AC 38 ms
53,324 KB
testcase_69 AC 38 ms
53,324 KB
testcase_70 AC 38 ms
53,324 KB
testcase_71 AC 39 ms
53,324 KB
testcase_72 AC 38 ms
53,324 KB
testcase_73 AC 38 ms
53,324 KB
testcase_74 AC 38 ms
53,324 KB
testcase_75 AC 38 ms
53,324 KB
testcase_76 AC 122 ms
74,592 KB
testcase_77 WA -
testcase_78 AC 123 ms
74,584 KB
testcase_79 AC 38 ms
53,324 KB
testcase_80 AC 122 ms
74,584 KB
testcase_81 AC 96 ms
69,568 KB
testcase_82 AC 46 ms
59,328 KB
testcase_83 WA -
testcase_84 WA -
testcase_85 AC 38 ms
53,324 KB
testcase_86 AC 38 ms
53,324 KB
testcase_87 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n = int(input())
    for p in range(2, 10 ** 6 + 1):
        acc = 1
        pk = 1
        while acc <= n:
            if n % acc == 0 and n // acc < p:
                return p
            pk *= p
            acc += pk
    p = n - 1
    i = 2
    while i * i <= p:
        if p % i == 0:
            return n + 1    
        i += 1
    return p

print(solve())
0