結果

問題 No.3020 ユークリッドの互除法・改
ユーザー Kude
提出日時 2025-02-14 21:26:27
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 171 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 65,176 KB
最終ジャッジ日時 2025-02-14 21:26:52
合計ジャッジ時間 2,279 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
a, b = map(int, input().split())
c, d = map(int, input().split())
g = gcd(gcd(gcd(a, b), c), d)
D = abs(a * d - b * c)
t = D // g // g
print(g, t * g)
0