結果
| 問題 | No.2117 中国剰余定理入門 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-04 21:26:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 59,392 KB |
| 最終ジャッジ日時 | 2024-07-18 19:09:50 |
| 合計ジャッジ時間 | 1,490 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
a,b = map(int,input().split())
c,d = map(int,input().split())
s = b % a
t = d % c
check = 0
for i in range(1000):
for j in range(1000):
if s + a*i == t + c*j:
print(s+a*i)
check = 1
exit()
if s + a*i < t + c*j:
break
print('NaN')