結果
| 問題 |
No.2558 中国剰余定理
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-02 14:32:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 96 ms / 2,000 ms |
| コード長 | 213 bytes |
| コンパイル時間 | 1,842 ms |
| コンパイル使用メモリ | 193,244 KB |
| 最終ジャッジ日時 | 2025-02-18 03:32:28 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
ll A,B,a,b;
cin>>A>>B>>a>>b;
for(ll x=0;x<=10000000;x++){
if(x%A==a&&x%B==b){
cout<<x<<endl;
exit(0);
}
}
}