結果
| 問題 | No.2558 中国剰余定理 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-12-02 14:38:39 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 46 ms / 2,000 ms | 
| コード長 | 268 bytes | 
| コンパイル時間 | 235 ms | 
| コンパイル使用メモリ | 82,048 KB | 
| 実行使用メモリ | 57,856 KB | 
| 最終ジャッジ日時 | 2024-09-26 17:02:35 | 
| 合計ジャッジ時間 | 2,577 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
def INT():
    return int(input())
def MI():
    return map(int, input().split())
def LI():
    return list(map(int, input().split()))
A, B, a, b = MI()
for i in range(10**7):
    if (i * A + a) % B == b:
        print(i * A + a)
        exit()
            
            
            
        