結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー rpy3cpp
提出日時 2016-04-03 02:06:50
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 327 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-10-02 12:33:15
合計ジャッジ時間 3,398 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import gcd

t1 = int(input())
t2 = int(input())
t3 = int(input())
LCM12 = t1 * t2 // gcd(t1, t2)
LCM123 = LCM12 * t3 // gcd(LCM12, t3)

d = 1
for i in range(2, t3 + 1):
    if t1 % i == t2 % i == t3 % i:
        if gcd(i, LCM123) == 1:
            d = i
p = gcd(LCM123, d)
print('{}/{}'.format(LCM123//p, d//p))
0