結果

問題 No.308 素数は通れません
ユーザー shimomireshimomire
提出日時 2015-12-01 00:42:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,145 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-10-12 06:08:18
合計ジャッジ時間 4,815 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,852 KB
testcase_01 AC 16 ms
7,960 KB
testcase_02 AC 16 ms
7,812 KB
testcase_03 AC 15 ms
7,764 KB
testcase_04 AC 15 ms
7,812 KB
testcase_05 AC 14 ms
7,884 KB
testcase_06 AC 15 ms
7,764 KB
testcase_07 AC 15 ms
7,884 KB
testcase_08 AC 15 ms
7,908 KB
testcase_09 WA -
testcase_10 AC 15 ms
7,880 KB
testcase_11 AC 16 ms
7,868 KB
testcase_12 AC 15 ms
7,768 KB
testcase_13 AC 15 ms
7,972 KB
testcase_14 AC 15 ms
7,828 KB
testcase_15 AC 16 ms
7,776 KB
testcase_16 AC 15 ms
7,808 KB
testcase_17 AC 15 ms
7,916 KB
testcase_18 AC 15 ms
7,924 KB
testcase_19 AC 16 ms
7,796 KB
testcase_20 AC 16 ms
7,816 KB
testcase_21 AC 15 ms
7,776 KB
testcase_22 AC 15 ms
7,888 KB
testcase_23 AC 15 ms
7,728 KB
testcase_24 AC 15 ms
7,808 KB
testcase_25 AC 15 ms
7,772 KB
testcase_26 AC 15 ms
7,760 KB
testcase_27 AC 16 ms
7,844 KB
testcase_28 AC 15 ms
7,956 KB
testcase_29 AC 15 ms
7,780 KB
testcase_30 AC 15 ms
7,764 KB
testcase_31 AC 15 ms
7,848 KB
testcase_32 WA -
testcase_33 AC 14 ms
7,776 KB
testcase_34 AC 16 ms
7,912 KB
testcase_35 AC 15 ms
7,912 KB
testcase_36 AC 15 ms
7,848 KB
testcase_37 AC 15 ms
7,804 KB
testcase_38 AC 16 ms
7,768 KB
testcase_39 AC 15 ms
7,956 KB
testcase_40 AC 16 ms
7,808 KB
testcase_41 AC 15 ms
7,828 KB
testcase_42 AC 15 ms
7,812 KB
testcase_43 AC 15 ms
7,724 KB
testcase_44 AC 15 ms
7,868 KB
testcase_45 AC 15 ms
7,888 KB
testcase_46 AC 15 ms
7,808 KB
testcase_47 AC 16 ms
7,804 KB
testcase_48 AC 15 ms
7,728 KB
testcase_49 AC 15 ms
7,944 KB
testcase_50 AC 15 ms
7,880 KB
testcase_51 AC 15 ms
7,800 KB
testcase_52 AC 15 ms
7,860 KB
testcase_53 AC 15 ms
7,856 KB
testcase_54 AC 15 ms
7,860 KB
testcase_55 AC 15 ms
7,932 KB
testcase_56 AC 16 ms
7,812 KB
testcase_57 AC 15 ms
7,784 KB
testcase_58 AC 15 ms
7,904 KB
testcase_59 AC 15 ms
7,848 KB
testcase_60 AC 16 ms
7,832 KB
testcase_61 AC 15 ms
7,868 KB
testcase_62 AC 15 ms
7,864 KB
testcase_63 AC 15 ms
7,856 KB
testcase_64 AC 15 ms
7,812 KB
testcase_65 AC 15 ms
7,968 KB
testcase_66 AC 15 ms
7,964 KB
testcase_67 AC 15 ms
7,792 KB
testcase_68 AC 16 ms
7,804 KB
testcase_69 AC 15 ms
7,784 KB
testcase_70 AC 15 ms
7,724 KB
testcase_71 AC 16 ms
7,792 KB
testcase_72 AC 16 ms
7,812 KB
testcase_73 AC 15 ms
7,792 KB
testcase_74 AC 15 ms
7,884 KB
testcase_75 AC 16 ms
7,928 KB
testcase_76 WA -
testcase_77 AC 16 ms
7,824 KB
testcase_78 AC 16 ms
7,912 KB
testcase_79 AC 15 ms
7,860 KB
testcase_80 WA -
testcase_81 WA -
testcase_82 AC 15 ms
7,852 KB
testcase_83 AC 15 ms
7,872 KB
testcase_84 WA -
testcase_85 AC 15 ms
7,932 KB
testcase_86 WA -
testcase_87 WA -
testcase_88 AC 16 ms
7,748 KB
testcase_89 AC 16 ms
7,724 KB
testcase_90 WA -
testcase_91 AC 15 ms
7,724 KB
testcase_92 AC 15 ms
7,812 KB
testcase_93 AC 16 ms
7,728 KB
testcase_94 AC 15 ms
7,904 KB
testcase_95 AC 15 ms
7,936 KB
testcase_96 AC 15 ms
7,856 KB
testcase_97 AC 15 ms
7,920 KB
testcase_98 AC 16 ms
7,812 KB
testcase_99 AC 15 ms
7,776 KB
testcase_100 AC 15 ms
7,804 KB
testcase_101 WA -
testcase_102 AC 15 ms
7,916 KB
testcase_103 AC 16 ms
7,916 KB
testcase_104 AC 15 ms
7,880 KB
testcase_105 AC 15 ms
7,764 KB
testcase_106 AC 15 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# W = 2
#   1  x2
#  x3

# W = 3
#   1  x2  x3
#   4  x5
#  x7

# W = 4
#   1  x2
#  x5

# W = 5
#   1  x2
#   6  x7
# x11

# W = 6
#   1  x2
#  x7

# W = 7
#   1  x2  x3
#   8   9  10 x11
#  15  16 x17
#  22 x23
# x29 

# W = 8
#   1  x2  x3   4  x5   6  x7   8
#   9  10 x11  12 x13  14  15  16
# x17  18 x19  20  21  22 x23  24
#  25  26  27  28 x29  30 x31  32
# ................................  N >= 26 は ok

# N <= 25 の時、 

# W = 9
#   1  x2
#  10 x11
# x19

# W = 10
#   1  x2
# x11

# W = 11
#   1  x2
#  12 x13
# x23

# W = 12
#   1  x2  x3   4  x5   6  x7   8   9  10 x11  12
# x13  14  15  16 x17  18 x19  20  21  22 x23  24
#  25

def run(N) :
    if N > 25 : 
        return 8
    # N = 4,6,8,9,10,12,14,15,16,18,20,21,22,24,25
    if N == 4 :
        return 3
    if N == 6:
        return 5
    if N==8 or N == 9 or N == 10 or N == 15 or N == 16 or N == 22:
        return 7
    # N = 12,14,18,20,21,24
    if N==12:
        return 11
    if N == 14:
        return 13
    if N == 18:
        return 17
    if N== 20 or N == 21:
        return 19
    if N==24 or N == 25:
        return 23

N = int(input())
print(run(N))
0