結果

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

ソースコード

diff #

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