結果

問題 No.843 Triple Primes
ユーザー amyuamyu
提出日時 2019-06-28 22:46:17
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 770 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 84,116 KB
最終ジャッジ日時 2023-09-14 22:27:06
合計ジャッジ時間 8,098 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,304 KB
testcase_01 AC 193 ms
84,116 KB
testcase_02 AC 79 ms
76,308 KB
testcase_03 AC 79 ms
76,372 KB
testcase_04 AC 82 ms
76,280 KB
testcase_05 AC 79 ms
76,080 KB
testcase_06 AC 81 ms
76,236 KB
testcase_07 AC 167 ms
81,968 KB
testcase_08 AC 175 ms
82,908 KB
testcase_09 AC 193 ms
83,840 KB
testcase_10 AC 168 ms
82,120 KB
testcase_11 AC 182 ms
82,812 KB
testcase_12 AC 191 ms
83,648 KB
testcase_13 AC 187 ms
82,936 KB
testcase_14 AC 184 ms
82,896 KB
testcase_15 AC 167 ms
81,988 KB
testcase_16 AC 167 ms
81,880 KB
testcase_17 WA -
testcase_18 AC 72 ms
71,112 KB
testcase_19 AC 72 ms
71,288 KB
testcase_20 AC 101 ms
77,400 KB
testcase_21 AC 89 ms
76,392 KB
testcase_22 AC 134 ms
79,504 KB
testcase_23 AC 136 ms
80,092 KB
testcase_24 AC 103 ms
77,104 KB
testcase_25 AC 96 ms
76,684 KB
testcase_26 AC 194 ms
83,860 KB
testcase_27 AC 83 ms
76,384 KB
testcase_28 AC 186 ms
82,948 KB
testcase_29 AC 106 ms
77,416 KB
testcase_30 AC 190 ms
83,520 KB
testcase_31 AC 85 ms
76,116 KB
testcase_32 AC 81 ms
76,268 KB
testcase_33 AC 110 ms
77,496 KB
testcase_34 AC 130 ms
79,220 KB
testcase_35 AC 193 ms
83,932 KB
testcase_36 AC 95 ms
76,604 KB
testcase_37 AC 161 ms
82,004 KB
testcase_38 AC 145 ms
80,600 KB
testcase_39 AC 186 ms
83,688 KB
testcase_40 AC 68 ms
71,420 KB
testcase_41 WA -
testcase_42 AC 173 ms
82,432 KB
testcase_43 AC 182 ms
82,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
p=[2]
for i in range(3,n+1):
    for j in p:
        if j*j>i:
            p.append(i)
            break
        if i%j==0:
            break
s=set(p)
ans=1
for i in p[1:]:
    if i*i-2 in s:
        ans+=2
print(ans)
0