結果

問題 No.356 円周上を回る3つの動点の一致
コンテスト
ユーザー ckawatak
提出日時 2018-07-28 16:02:55
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 25 ms / 5,000 ms
+ 924µs
コード長 224 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 65 ms
コンパイル使用メモリ 81,552 KB
実行使用メモリ 54,280 KB
最終ジャッジ日時 2026-09-16 00:26:02
合計ジャッジ時間 3,469 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

t1 = int(input())
t2 = int(input())
t3 = int(input())

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

x = t3 * t2 * t1
y = gcd((t2-t1) * t3, (t3-t2) * t1)
z = gcd(x, y)

print('%d/%d' % (x/z, y/z))
0