結果
| 問題 | No.2558 中国剰余定理 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-12-02 14:33:46 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 115 ms / 2,000 ms | 
| コード長 | 602 bytes | 
| コンパイル時間 | 311 ms | 
| コンパイル使用メモリ | 82,400 KB | 
| 実行使用メモリ | 81,024 KB | 
| 最終ジャッジ日時 | 2024-09-26 16:50:22 | 
| 合計ジャッジ時間 | 4,330 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
from collections import defaultdict, deque, Counter
import copy
from itertools import combinations, permutations, product, accumulate, groupby, chain
from heapq import heapify, heappop, heappush
import math
import bisect
from pprint import pprint
from random import randint
import sys
# sys.setrecursionlimit(200000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)
#################################################    
A, B, a, b = map(int, input().split())
x = 0
while x%A != a or x%B != b:
    x += 1
print(x)
            
            
            
        