結果

問題 No.2117 中国剰余定理入門
ユーザー 👑 Kazun
提出日時 2022-11-04 21:25:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 58,048 KB
最終ジャッジ日時 2024-07-18 19:08:58
合計ジャッジ時間 1,631 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

B1,C1=map(int,input().split())
B2,C2=map(int,input().split())

for n in range(100000):
    if (n-C1)%B1==0 and (n-C2)%B2==0:
        exit(print(n))
print("NaN")
0