結果

問題 No.2558 中国剰余定理
ユーザー liny_tail
提出日時 2024-08-13 17:15:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 156 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-08-13 17:16:08
合計ジャッジ時間 10,490 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, a, b = map(int, input().split(' '))

x = 0
while True:
  if x % A == a and x % B == b:
    break
  x += 1
  if x > A*B:
    x = 0
    break

print(x)
0