結果
| 問題 | No.356 円周上を回る3つの動点の一致 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-04-03 02:22:56 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 35 ms / 5,000 ms | 
| コード長 | 334 bytes | 
| コンパイル時間 | 207 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-23 21:35:11 | 
| 合計ジャッジ時間 | 3,511 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 48 | 
ソースコード
from math import gcd
t1 = int(input())
t2 = int(input())
t3 = int(input())
LCM12 = t1 * t2 // gcd(t1, t2)
LCM123 = LCM12 * t3 // gcd(LCM12, t3)
n1 = LCM123//t1
n2 = LCM123//t2
n3 = LCM123//t3
d = 1
for i in range(2, t3 + 1):
    if n1 % i == n2 % i == n3 % i:
        d = i
p = gcd(LCM123, d)
print('{}/{}'.format(LCM123//p, d//p))
            
            
            
        