結果
問題 |
No.2558 中国剰余定理
|
ユーザー |
![]() |
提出日時 | 2025-09-03 07:34:42 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 2,795 ms |
コンパイル使用メモリ | 275,648 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-03 07:34:46 |
合計ジャッジ時間 | 4,640 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef LOCAL #include <debug.hpp> #else #define debug(...) #endif int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); int A, B, a, b; cin >> A >> B >> a >> b; for (int x = 0; x <= A * B; x++) { if (x % A == a && x % B == b) { cout << x << '\n'; return 0; } } }