結果
| 問題 |
No.843 Triple Primes
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-09 09:02:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 180 ms / 2,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 34,716 KB |
| 最終ジャッジ日時 | 2024-11-17 09:52:35 |
| 合計ジャッジ時間 | 6,338 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 42 |
ソースコード
n=int(input())+1 if n<3: print(0);exit(0) 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)