結果

問題 No.356 円周上を回る3つの動点の一致
ユーザー fumofumofunifumofumofuni
提出日時 2021-09-13 23:29:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 71,584 KB
最終ジャッジ日時 2023-09-08 07:47:09
合計ジャッジ時間 6,420 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,088 KB
testcase_01 AC 72 ms
71,216 KB
testcase_02 AC 74 ms
71,384 KB
testcase_03 AC 76 ms
71,092 KB
testcase_04 AC 73 ms
71,196 KB
testcase_05 AC 74 ms
71,392 KB
testcase_06 AC 73 ms
71,072 KB
testcase_07 AC 72 ms
71,000 KB
testcase_08 AC 73 ms
71,192 KB
testcase_09 AC 75 ms
71,584 KB
testcase_10 AC 73 ms
71,412 KB
testcase_11 AC 73 ms
70,908 KB
testcase_12 AC 74 ms
71,056 KB
testcase_13 AC 73 ms
71,196 KB
testcase_14 AC 75 ms
71,472 KB
testcase_15 AC 73 ms
71,384 KB
testcase_16 AC 73 ms
71,476 KB
testcase_17 AC 72 ms
71,244 KB
testcase_18 AC 73 ms
71,092 KB
testcase_19 AC 73 ms
71,056 KB
testcase_20 AC 71 ms
70,908 KB
testcase_21 AC 68 ms
71,260 KB
testcase_22 AC 71 ms
71,096 KB
testcase_23 AC 71 ms
71,232 KB
testcase_24 AC 68 ms
71,260 KB
testcase_25 AC 68 ms
71,204 KB
testcase_26 AC 70 ms
71,500 KB
testcase_27 AC 72 ms
71,468 KB
testcase_28 AC 67 ms
71,188 KB
testcase_29 AC 67 ms
71,416 KB
testcase_30 AC 65 ms
71,056 KB
testcase_31 AC 66 ms
71,052 KB
testcase_32 AC 67 ms
71,480 KB
testcase_33 AC 66 ms
71,196 KB
testcase_34 AC 66 ms
71,180 KB
testcase_35 AC 66 ms
71,584 KB
testcase_36 AC 68 ms
71,356 KB
testcase_37 AC 68 ms
71,200 KB
testcase_38 AC 71 ms
71,416 KB
testcase_39 AC 71 ms
71,212 KB
testcase_40 AC 66 ms
71,188 KB
testcase_41 AC 71 ms
71,340 KB
testcase_42 AC 66 ms
71,096 KB
testcase_43 AC 67 ms
71,088 KB
testcase_44 AC 69 ms
71,416 KB
testcase_45 AC 68 ms
71,192 KB
testcase_46 AC 68 ms
71,396 KB
testcase_47 AC 71 ms
71,060 KB
testcase_48 AC 70 ms
71,412 KB
testcase_49 AC 72 ms
71,296 KB
testcase_50 AC 69 ms
71,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
A=int(input())
B=int(input())
C=int(input())
def lcm(a,b):
    return a*b//math.gcd(a,b)
def gcd(a,b):
    return math.gcd(a,b)
num1=B-A
den1=B*A
g1=gcd(num1,den1)
num1//=g1
den1//=g1
num2=C-B
den2=C*B
g2=gcd(num2,den2)
num2//=g2
den2//=g2
num3=lcm(den1,den2)
den3=gcd(num1,num2)
g3=gcd(num3,den3)
num3//=g3
den3//=g3
print('%d/%d' % (num3,den3))
0