結果
問題 |
No.1140 EXPotentiaLLL!
|
ユーザー |
|
提出日時 | 2022-06-14 14:27:08 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 388 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 73,088 KB |
最終ジャッジ日時 | 2024-10-02 09:45:41 |
合計ジャッジ時間 | 2,988 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 RE * 8 |
ソースコード
#yuki1140 T=int(input()) is_prime=[True]*500002 is_prime[0]=is_prime[1]=False for p in range(0,500002): if not is_prime[p]: continue for i in range(p*p,500002,p): is_prime[i]=False for i in range(T): A,P = map(int,input().split()) if is_prime[P]: if A%P==0: print(0) else: print(1) else: print(-1)