結果

問題 No.2324 Two Countries within UEC
ユーザー Haru_Z
提出日時 2023-05-28 14:00:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 264 bytes
コンパイル時間 461 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 443,696 KB
最終ジャッジ日時 2024-12-26 22:45:28
合計ジャッジ時間 99,162 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 TLE * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
n,m,p,q=map(int,input().split())
f=defaultdict(list)
for i in range(1,n+1):
        for j in range(1,m+1):
                f[i].append((i*j)%p)
for i in range(q):
        x,k=map(int,input().split())
        print(f[x].count(k))
0