結果

問題 No.2555 Intriguing Triangle
ユーザー ニックネームニックネーム
提出日時 2023-12-01 00:25:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 526 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 17,300 KB
最終ジャッジ日時 2023-12-01 13:38:53
合計ジャッジ時間 11,310 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
17,300 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 39 ms
10,496 KB
testcase_06 AC 33 ms
10,496 KB
testcase_07 AC 41 ms
10,496 KB
testcase_08 AC 69 ms
10,496 KB
testcase_09 AC 268 ms
10,496 KB
testcase_10 AC 1,027 ms
10,496 KB
testcase_11 AC 908 ms
10,496 KB
testcase_12 WA -
testcase_13 AC 1,129 ms
10,496 KB
testcase_14 AC 1,150 ms
10,496 KB
testcase_15 AC 442 ms
10,496 KB
testcase_16 AC 285 ms
10,496 KB
testcase_17 AC 32 ms
10,496 KB
testcase_18 WA -
testcase_19 AC 39 ms
10,496 KB
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal
de,ab,ac = Decimal(input()),Decimal(input()),Decimal(input())
f = False
for bd in range(1,int(ab+ac-de)):
    for ec in range(1,int(ab+ac-de-bd)):
        bd = Decimal(bd); ec = Decimal(ec); bc = bd+de+ec
        ad = (Decimal(ab**2+bd**2)-Decimal(bd*(ab**2+bc**2-ac**2))/Decimal(bc))**Decimal("0.5")
        ae = (Decimal(ac**2+ec**2)-Decimal(ec*(ac**2+bc**2-ab**2))/Decimal(bc))**Decimal("0.5")
        if (ab**2+ad**2-bd**2)*ac*ae==(ac**2+ae**2-ec**2)*ab*ad: f = True
print("Yes" if f else "No")
0