結果
| 問題 | No.2558 中国剰余定理 |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2023-12-06 00:17:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 4,142 ms |
| コンパイル使用メモリ | 250,740 KB |
| 最終ジャッジ日時 | 2025-02-18 07:59:17 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001
int main(){
int A,B,a,b;
cin>>A>>B>>a>>b;
rep(i,Inf32){
if(i%A==a&&i%B==b){
cout<<i<<endl;
break;
}
}
return 0;
}
沙耶花