結果
| 問題 |
No.2324 Two Countries within UEC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-28 15:37:44 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 305 bytes |
| コンパイル時間 | 873 ms |
| コンパイル使用メモリ | 28,800 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-12-27 07:44:48 |
| 合計ジャッジ時間 | 99,509 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 TLE * 31 |
ソースコード
#include <stdio.h>
int main(void)
{
int N, M, P, Q, x, y, f, ans;
scanf("%d %d %d %d", &N, &M, &P, &Q);
for (int i = 0; i < Q; i++) {
scanf("%d %d", &x, &f);
ans=0;
for (y = 1; y <= M; y++) {
if ((x*y)%P==f) {
ans++;
}
}
printf("%d\n", ans);
}
return 0;
}