結果
| 問題 |
No.2324 Two Countries within UEC
|
| コンテスト | |
| ユーザー |
pあり
|
| 提出日時 | 2023-05-28 13:55:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 228 bytes |
| コンパイル時間 | 375 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-26 22:19:44 |
| 合計ジャッジ時間 | 16,160 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 RE * 11 |
ソースコード
n,m,p,q = map(int, input().split())
for _ in range(q):
x,f = map(int, input().split())
a = f*pow(x, -1, p)
a%=p
if(m<a):
print(0)
continue
ans = m//p
if(m%p >= (a+p-1)%p):
ans+=1
print(ans)
pあり