結果
| 問題 |
No.2324 Two Countries within UEC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-16 23:43:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 628 ms |
| コンパイル使用メモリ | 63,860 KB |
| 実行使用メモリ | 16,960 KB |
| 最終ジャッジ日時 | 2024-09-17 18:46:05 |
| 合計ジャッジ時間 | 7,799 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 40 |
ソースコード
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int N, M, P, Q;
cin >> N >> M >> P >> Q;
for(int i=0;i<Q;i++){
int ans = 0;
int x, f;
cin >> x >> f;
for(int j=1;j<=M;j++){
if(x*j%P == f){
ans++;
}
}
cout<<ans<<endl;
}
}