結果
問題 | No.2324 Two Countries within UEC |
ユーザー |
👑 |
提出日時 | 2023-05-28 20:54:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,088 ms / 2,000 ms |
コード長 | 163 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-07 01:47:23 |
合計ジャッジ時間 | 23,141 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 41 |
ソースコード
def J(): return map(int,input().split()) N,M,P,Q=J() for i in range(Q): x,f=J() y=pow(x,P-2,P)*f%P if y<1:y=P print([[(M-y)//P+1,0][M<y],[0,M][f%P<1]][x%P<1])