結果

問題 No.229 線分上を往復する3つの動点の一致
ユーザー mbanmban
提出日時 2017-10-14 10:15:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 589 bytes
コンパイル時間 409 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 91,776 KB
最終ジャッジ日時 2024-04-28 19:03:20
合計ジャッジ時間 13,233 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 249 ms
91,264 KB
testcase_01 AC 245 ms
91,384 KB
testcase_02 AC 224 ms
91,368 KB
testcase_03 AC 233 ms
91,392 KB
testcase_04 AC 221 ms
91,520 KB
testcase_05 AC 226 ms
91,416 KB
testcase_06 AC 220 ms
91,264 KB
testcase_07 AC 229 ms
91,392 KB
testcase_08 WA -
testcase_09 AC 220 ms
91,392 KB
testcase_10 AC 224 ms
91,392 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 214 ms
91,392 KB
testcase_14 AC 225 ms
91,392 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 243 ms
91,492 KB
testcase_28 AC 219 ms
91,520 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 227 ms
91,264 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 229 ms
91,528 KB
testcase_36 WA -
testcase_37 AC 232 ms
91,392 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 226 ms
91,432 KB
testcase_43 AC 220 ms
91,264 KB
testcase_44 AC 232 ms
91,392 KB
testcase_45 AC 236 ms
91,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction

T1 = int(input())
T2 = int(input())
T3 = int(input())

T4 = 1 / (Fraction(1, T1) + Fraction(1, T2))
T5 = 1 / (Fraction(1, T1) + Fraction(1, T3))
T6 = 1 / (Fraction(1, T1) - Fraction(1, T2))
T7 = 1 / (Fraction(1, T1) - Fraction(1, T3))
time = []

for i in range(1, 10000):
    time.append(T4 * i)
    time.append(T6 * i)

time.sort()


for t in time:
    tn = t.numerator
    td = t.denominator
    if (tn * T5.denominator) % (td * T5.numerator) == 0 or (tn * T7.denominator) % (td * T7.numerator) == 0:
        print("{0}/{1}".format(tn,td))
        break;
0