結果

問題 No.2117 中国剰余定理入門
ユーザー Nikkuniku029
提出日時 2022-11-04 21:27:08
言語 Python3
(3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 18 ms / 2,000 ms
+ 43µs
コード長 201 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 256 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2026-10-24 22:18:21
合計ジャッジ時間 2,026 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

b0, c0 = map(int, input().split())
b1, c1 = map(int, input().split())
n = b0*b1

ans = 'NaN'
for i in range(n):
    if i % b0 == c0 % b0 and i % b1 == c1 % b1:
        ans = i
        break
print(ans)
0