結果
問題 |
No.3020 ユークリッドの互除法・改
|
ユーザー |
![]() |
提出日時 | 2025-02-14 22:33:59 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 155 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 82,488 KB |
実行使用メモリ | 66,008 KB |
最終ジャッジ日時 | 2025-02-14 22:34:20 |
合計ジャッジ時間 | 2,128 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 RE * 1 |
ソースコード
from math import gcd a, b = map(int, input().split()) c, d = map(int, input().split()) diff = abs(a*d-b*c) print(gcd(a, b, c, d), diff//gcd(a, b, c, d))