結果

問題 No.2324 Two Countries within UEC
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-05-28 14:25:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 86,792 KB
実行使用メモリ 79,072 KB
最終ジャッジ日時 2023-08-27 09:43:35
合計ジャッジ時間 12,959 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 382 ms
78,884 KB
testcase_01 AC 394 ms
78,552 KB
testcase_02 AC 161 ms
78,312 KB
testcase_03 AC 316 ms
78,668 KB
testcase_04 AC 353 ms
78,840 KB
testcase_05 AC 166 ms
78,052 KB
testcase_06 AC 211 ms
78,520 KB
testcase_07 AC 154 ms
78,196 KB
testcase_08 AC 311 ms
78,712 KB
testcase_09 AC 315 ms
78,872 KB
testcase_10 AC 395 ms
78,788 KB
testcase_11 AC 386 ms
78,904 KB
testcase_12 AC 199 ms
78,808 KB
testcase_13 AC 197 ms
78,688 KB
testcase_14 AC 163 ms
78,308 KB
testcase_15 AC 154 ms
78,360 KB
testcase_16 AC 299 ms
78,932 KB
testcase_17 AC 246 ms
78,972 KB
testcase_18 AC 165 ms
78,196 KB
testcase_19 AC 389 ms
78,764 KB
testcase_20 AC 151 ms
78,328 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 399 ms
78,808 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 73 ms
71,372 KB
testcase_32 AC 72 ms
71,204 KB
testcase_33 AC 73 ms
71,128 KB
testcase_34 AC 73 ms
71,136 KB
testcase_35 AC 74 ms
71,180 KB
testcase_36 AC 74 ms
71,340 KB
testcase_37 AC 74 ms
71,540 KB
testcase_38 AC 73 ms
71,360 KB
testcase_39 AC 72 ms
71,204 KB
testcase_40 AC 73 ms
71,480 KB
testcase_41 WA -
testcase_42 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,p,q = map(int,input().split())
for _ in range(q):
	x,f = map(int,input().split())
	
	y = f * pow(x,p-2,p) % p
	ans = m//p
	if 0 < y <= m%p:
		ans += 1
	print(ans)
0