結果
問題 |
No.2324 Two Countries within UEC
|
ユーザー |
|
提出日時 | 2023-05-28 14:25:16 |
言語 | JavaScript (node v23.5.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 302 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 40,064 KB |
最終ジャッジ日時 | 2024-12-27 01:05:37 |
合計ジャッジ時間 | 5,631 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 41 |
ソースコード
N, M, P, Q = map(int, input().split()) x = [] f = [] for i in range(Q): a, b = map(int, input().split()) x.append(a) f.append(b) for i in range(Q): t = [] for j in range(M + 1): if f[i] == (x[i] * j) % P and j > 0: t.append(j) print(len(t))