結果

問題 No.843 Triple Primes
ユーザー matriematrie
提出日時 2021-01-08 23:48:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 34,836 KB
最終ジャッジ日時 2024-04-28 06:01:54
合計ジャッジ時間 6,172 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,624 KB
testcase_01 AC 183 ms
34,048 KB
testcase_02 AC 32 ms
10,880 KB
testcase_03 AC 32 ms
10,880 KB
testcase_04 AC 33 ms
11,264 KB
testcase_05 AC 32 ms
10,880 KB
testcase_06 AC 32 ms
11,136 KB
testcase_07 AC 160 ms
30,428 KB
testcase_08 AC 162 ms
32,024 KB
testcase_09 AC 180 ms
34,836 KB
testcase_10 AC 161 ms
31,296 KB
testcase_11 AC 169 ms
32,948 KB
testcase_12 AC 175 ms
34,276 KB
testcase_13 AC 179 ms
33,616 KB
testcase_14 AC 175 ms
33,632 KB
testcase_15 AC 159 ms
30,692 KB
testcase_16 AC 154 ms
31,044 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 31 ms
10,624 KB
testcase_20 AC 69 ms
16,768 KB
testcase_21 AC 51 ms
14,248 KB
testcase_22 AC 118 ms
24,888 KB
testcase_23 AC 118 ms
25,352 KB
testcase_24 AC 71 ms
17,408 KB
testcase_25 AC 61 ms
15,616 KB
testcase_26 AC 185 ms
34,692 KB
testcase_27 AC 39 ms
11,904 KB
testcase_28 AC 177 ms
33,932 KB
testcase_29 AC 74 ms
17,792 KB
testcase_30 AC 181 ms
34,252 KB
testcase_31 AC 43 ms
12,672 KB
testcase_32 AC 38 ms
11,776 KB
testcase_33 AC 78 ms
18,560 KB
testcase_34 AC 109 ms
24,020 KB
testcase_35 AC 182 ms
34,048 KB
testcase_36 AC 60 ms
15,144 KB
testcase_37 AC 147 ms
29,820 KB
testcase_38 AC 130 ms
27,040 KB
testcase_39 AC 180 ms
33,968 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 172 ms
32,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
L=list(range(n))
s=set()
for i in L:
	if L[i]<2:continue
	L[::i]=[0]*(n//i+(n%i>0))
	s.add(i)
	
c=0
a=set()
for p in s:
	if p*p-2 in s: c+=2
print(c-1)
0