結果
問題 |
No.2558 中国剰余定理
|
ユーザー |
![]() |
提出日時 | 2023-12-02 19:32:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 1,894 ms |
コンパイル使用メモリ | 192,776 KB |
最終ジャッジ日時 | 2025-02-18 06:14:48 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> #if __has_include("./debug.cpp") #include "./debug.cpp" #else #define debug(...) #define print_line #endif using namespace std; using ll = long long; int main() { int A, B, a, b; cin >> A >> B >> a >> b; for (int i = 0; i <= 9000000; i++) { if (i % A == a && i % B == b) { cout << i << endl; ; return 0; } } }