結果
| 問題 | No.2324 Two Countries within UEC |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-28 15:13:16 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 261 bytes |
| 記録 | |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 85,244 KB |
| 実行使用メモリ | 75,520 KB |
| 最終ジャッジ日時 | 2026-06-01 22:10:19 |
| 合計ジャッジ時間 | 7,178 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 40 |
ソースコード
N, M, P, Q = map(int, input().split())
def count_towns(x, f):
count = 0
for y in range(1, M + 1):
if (x * y) % P == f:
count += 1
return count
for _ in range(Q):
x, f = map(int, input().split())
print(count_towns(x, f))