結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー rpy3cpprpy3cpp
提出日時 2016-04-03 02:22:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 334 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 8,068 KB
最終ジャッジ日時 2023-10-01 04:10:15
合計ジャッジ時間 3,592 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,024 KB
testcase_01 AC 17 ms
7,972 KB
testcase_02 AC 17 ms
7,852 KB
testcase_03 AC 17 ms
7,896 KB
testcase_04 AC 18 ms
7,864 KB
testcase_05 AC 18 ms
8,052 KB
testcase_06 AC 17 ms
7,984 KB
testcase_07 AC 18 ms
7,892 KB
testcase_08 AC 17 ms
7,860 KB
testcase_09 AC 16 ms
7,976 KB
testcase_10 AC 15 ms
8,048 KB
testcase_11 AC 16 ms
7,892 KB
testcase_12 AC 17 ms
7,940 KB
testcase_13 AC 17 ms
8,064 KB
testcase_14 AC 18 ms
7,940 KB
testcase_15 AC 17 ms
8,068 KB
testcase_16 AC 18 ms
7,852 KB
testcase_17 AC 17 ms
7,924 KB
testcase_18 AC 18 ms
8,036 KB
testcase_19 AC 18 ms
7,920 KB
testcase_20 AC 18 ms
7,872 KB
testcase_21 AC 17 ms
7,940 KB
testcase_22 AC 18 ms
7,976 KB
testcase_23 AC 18 ms
7,936 KB
testcase_24 AC 17 ms
7,856 KB
testcase_25 AC 16 ms
7,900 KB
testcase_26 AC 18 ms
7,936 KB
testcase_27 AC 18 ms
7,896 KB
testcase_28 AC 18 ms
7,928 KB
testcase_29 AC 18 ms
7,884 KB
testcase_30 AC 18 ms
7,912 KB
testcase_31 AC 18 ms
7,868 KB
testcase_32 AC 16 ms
7,944 KB
testcase_33 AC 17 ms
7,900 KB
testcase_34 AC 19 ms
7,888 KB
testcase_35 AC 18 ms
7,980 KB
testcase_36 AC 18 ms
7,976 KB
testcase_37 AC 18 ms
7,852 KB
testcase_38 AC 17 ms
7,856 KB
testcase_39 AC 17 ms
7,900 KB
testcase_40 AC 18 ms
7,872 KB
testcase_41 AC 17 ms
8,040 KB
testcase_42 AC 17 ms
7,904 KB
testcase_43 AC 17 ms
7,908 KB
testcase_44 AC 16 ms
7,852 KB
testcase_45 AC 17 ms
7,908 KB
testcase_46 AC 18 ms
8,052 KB
testcase_47 AC 16 ms
7,864 KB
testcase_48 AC 16 ms
8,028 KB
testcase_49 AC 17 ms
7,920 KB
testcase_50 AC 17 ms
7,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0