結果
| 問題 |
No.2324 Two Countries within UEC
|
| コンテスト | |
| ユーザー |
kisa
|
| 提出日時 | 2023-05-28 14:43:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 277 bytes |
| コンパイル時間 | 1,560 ms |
| コンパイル使用メモリ | 166,452 KB |
| 実行使用メモリ | 16,968 KB |
| 最終ジャッジ日時 | 2024-12-27 02:42:48 |
| 合計ジャッジ時間 | 100,513 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 TLE * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, P, Q;
cin >> N >> M >> P >> Q;
for(int i=0; i<Q; i++) {
int x, f;
cin >> x >> f;
int answer=0;
for(int j=1; j<=M; j++) {
if((x*j)%P == f) {
answer++;
}
}
cout << answer << endl;
}
}
kisa