結果
| 問題 |
No.2324 Two Countries within UEC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-28 14:40:18 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 548 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 821,376 KB |
| 最終ジャッジ日時 | 2024-12-27 02:23:30 |
| 合計ジャッジ時間 | 32,732 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 RE * 13 MLE * 18 |
ソースコード
n, m, p, q = map(int, input().split())
xy = [[0] * m for _ in range(n)]
for i in range(n):
for j in range(m):
xy[i][j] = ((i + 1) * (j + 1)) % p
for _ in range(q):
x, f = map(int, input().split())
count = 0
for j in range(m):
if xy[x - 1][j] == f:
count += 1
print(count)