結果

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

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#input = sys.stdin.readline
#sys.setrecursionlimit(10**9)
#n = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
a,b = map(int,input().split())
c,d = map(int,input().split())
#for i in range(n):
#    alist.append(list(map(int,input().split())))
d1 = math.gcd(a,b,c,d)
print(d1,abs(a*d - b*c)//d1)
0