結果

問題 No.1140 EXPotentiaLLL!
ユーザー syunsukesyunsuke
提出日時 2020-09-16 22:18:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 86,252 KB
実行使用メモリ 116,600 KB
最終ジャッジ日時 2023-09-04 04:03:46
合計ジャッジ時間 18,112 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,425 ms
116,072 KB
testcase_01 AC 1,495 ms
116,268 KB
testcase_02 WA -
testcase_03 AC 1,298 ms
116,576 KB
testcase_04 AC 1,100 ms
116,308 KB
testcase_05 AC 1,464 ms
116,100 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 369 ms
115,448 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 394 ms
115,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P=[0 for i in range(5*10**6+1)]
P[0]=1
P[1]=1
#print(len(P))
for i in range(2,len(P)):
    if P[i]==0:
        for j in range(2,len(P)):
            if i*j>5*10**6:
                break
            else:
                P[i*j]=1

Q=int(input())
for q in range(Q):
    A,T=map(int,input().split())
    if P[T]==0:
        print(1)
    else:
        print(-1)
            
0