結果

問題 No.843 Triple Primes
ユーザー pluto77pluto77
提出日時 2019-07-01 11:19:08
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 437 ms
コンパイル使用メモリ 77,768 KB
実行使用メモリ 85,424 KB
最終ジャッジ日時 2023-09-22 18:55:16
合計ジャッジ時間 9,420 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
76,404 KB
testcase_01 AC 206 ms
85,120 KB
testcase_02 AC 85 ms
78,516 KB
testcase_03 AC 84 ms
78,512 KB
testcase_04 AC 83 ms
78,968 KB
testcase_05 AC 84 ms
78,672 KB
testcase_06 AC 86 ms
78,872 KB
testcase_07 AC 174 ms
84,336 KB
testcase_08 AC 185 ms
85,424 KB
testcase_09 AC 202 ms
85,252 KB
testcase_10 AC 178 ms
84,244 KB
testcase_11 AC 189 ms
84,080 KB
testcase_12 AC 198 ms
84,772 KB
testcase_13 AC 193 ms
83,904 KB
testcase_14 AC 193 ms
84,204 KB
testcase_15 AC 174 ms
84,324 KB
testcase_16 AC 179 ms
84,164 KB
testcase_17 WA -
testcase_18 AC 74 ms
76,228 KB
testcase_19 AC 75 ms
76,524 KB
testcase_20 AC 107 ms
79,720 KB
testcase_21 AC 95 ms
79,176 KB
testcase_22 AC 139 ms
81,768 KB
testcase_23 AC 144 ms
82,520 KB
testcase_24 AC 110 ms
79,728 KB
testcase_25 AC 102 ms
79,360 KB
testcase_26 AC 200 ms
84,852 KB
testcase_27 AC 87 ms
78,768 KB
testcase_28 AC 194 ms
84,028 KB
testcase_29 AC 112 ms
79,776 KB
testcase_30 AC 200 ms
84,648 KB
testcase_31 AC 89 ms
78,904 KB
testcase_32 AC 87 ms
78,864 KB
testcase_33 AC 112 ms
79,776 KB
testcase_34 AC 135 ms
81,800 KB
testcase_35 AC 201 ms
84,872 KB
testcase_36 AC 101 ms
78,980 KB
testcase_37 AC 169 ms
84,300 KB
testcase_38 AC 151 ms
82,724 KB
testcase_39 AC 195 ms
84,760 KB
testcase_40 AC 74 ms
76,352 KB
testcase_41 WA -
testcase_42 AC 183 ms
85,100 KB
testcase_43 AC 189 ms
84,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki843

x=int(raw_input())
def prime_list(x):
 pl=[2]
 for i in range(3,x+1):
  for j in pl:
   if j*j>i:
    pl.append(i)
    break
   if i%j==0:
    break
 return pl
p=prime_list(x)
s=set(p)
res=1
for i in p[1:]:
 if i*i-2 in s:
  res+=2
print res
0