結果

問題 No.3127 Multiple of Twin Prime
ユーザー june19312
提出日時 2025-04-25 22:52:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 288 bytes
コンパイル時間 551 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2025-04-25 22:52:38
合計ジャッジ時間 2,180 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from more_itertools import *
from bisect import *
sosu = list(sieve(10000000+100))
tmp = [-1]
for i in range(1,len(sosu)):
    if sosu[i]-2 == sosu[i-1]:
        tmp.append(sosu[i]*sosu[i-1])

T = int(input())

for i in range(T):
    N = int(input())
    print(tmp[bisect_right(tmp,N)-1])
0