結果
問題 | No.229 線分上を往復する3つの動点の一致 |
ユーザー | mban |
提出日時 | 2017-10-14 10:13:43 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 604 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 86,964 KB |
実行使用メモリ | 94,192 KB |
最終ジャッジ日時 | 2023-08-11 01:53:26 |
合計ジャッジ時間 | 16,686 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 300 ms
93,096 KB |
testcase_01 | WA | - |
testcase_02 | AC | 299 ms
93,492 KB |
testcase_03 | AC | 293 ms
92,940 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 272 ms
93,260 KB |
testcase_10 | AC | 294 ms
93,748 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 302 ms
93,236 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 | 315 ms
93,636 KB |
testcase_28 | AC | 283 ms
93,504 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 284 ms
93,712 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 290 ms
93,212 KB |
testcase_36 | WA | - |
testcase_37 | AC | 303 ms
93,028 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | AC | 303 ms
93,644 KB |
testcase_43 | AC | 298 ms
93,496 KB |
testcase_44 | AC | 295 ms
92,864 KB |
testcase_45 | AC | 303 ms
93,244 KB |
ソースコード
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: print(t) break; if (tn * T7.denominator) % (td * T7.numerator) == 0: print(t) break;