結果

問題 No.1140 EXPotentiaLLL!
ユーザー pluto77pluto77
提出日時 2020-10-06 10:06:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 117,016 KB
最終ジャッジ日時 2023-09-27 06:27:37
合計ジャッジ時間 14,784 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,329 ms
116,976 KB
testcase_01 AC 1,299 ms
116,916 KB
testcase_02 AC 1,300 ms
116,732 KB
testcase_03 AC 1,164 ms
117,016 KB
testcase_04 AC 938 ms
116,480 KB
testcase_05 AC 1,349 ms
116,584 KB
testcase_06 WA -
testcase_07 AC 1,387 ms
116,896 KB
testcase_08 AC 259 ms
116,012 KB
testcase_09 AC 250 ms
116,036 KB
testcase_10 AC 255 ms
115,680 KB
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1140
prime=[1]*5000001
for i in range(2,5000001):
 if prime[i]:
  for j in range(i**2,5000001,i):
   prime[j]=0
x=int(input())
for i in range(x):
 a,p=map(int,input().split())
 if prime[p]:
  print(1 if a%p else 0)
 else:
  print(-1)
0