結果
問題 |
No.2558 中国剰余定理
|
ユーザー |
|
提出日時 | 2023-09-19 11:06:26 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 246 bytes |
コンパイル時間 | 5,415 ms |
コンパイル使用メモリ | 243,388 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 21:39:50 |
合計ジャッジ時間 | 3,739 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin >> a >> b >> c >> d; assert(a>0&&a<3001); assert(b>0&&b<3001); assert(c>-1&&c<a); assert(d>-1&&d<b); assert(gcd(a,b)==1); while(c%b!=d) c+=a; cout << c << endl; }