結果

問題 No.1140 EXPotentiaLLL!
ユーザー googol_S0
提出日時 2020-08-01 00:17:30
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 235 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 82,112 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2024-07-06 22:38:45
合計ジャッジ時間 2,304 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 3 RE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
A,P=0,0
PR=[1]*600000
PR[0]=0
PR[1]=0
for i in range(2,600000):
  if PR[i]:
    for j in range(i*2,600000,i):
      PR[j]=0
for i in range(T):
  A,P=map(int,input().split())
  if PR[P]:
    print(1)
  else:
    print(-1)
0