結果

問題 No.2555 Intriguing Triangle
ユーザー ButterflvButterflv
提出日時 2023-12-01 00:53:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 66,744 KB
最終ジャッジ日時 2023-12-01 13:40:11
合計ジャッジ時間 2,384 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,844 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 36 ms
53,844 KB
testcase_06 AC 36 ms
53,844 KB
testcase_07 AC 36 ms
53,844 KB
testcase_08 AC 41 ms
53,844 KB
testcase_09 AC 41 ms
55,992 KB
testcase_10 AC 47 ms
62,552 KB
testcase_11 AC 48 ms
62,552 KB
testcase_12 AC 50 ms
64,692 KB
testcase_13 AC 56 ms
66,744 KB
testcase_14 AC 53 ms
62,552 KB
testcase_15 AC 47 ms
62,552 KB
testcase_16 AC 41 ms
55,992 KB
testcase_17 AC 36 ms
53,844 KB
testcase_18 WA -
testcase_19 AC 36 ms
53,844 KB
testcase_20 AC 50 ms
64,692 KB
testcase_21 AC 49 ms
64,696 KB
testcase_22 WA -
testcase_23 AC 38 ms
53,844 KB
testcase_24 AC 37 ms
53,844 KB
testcase_25 AC 39 ms
55,992 KB
testcase_26 AC 41 ms
55,992 KB
testcase_27 AC 52 ms
62,552 KB
testcase_28 AC 37 ms
53,844 KB
testcase_29 AC 53 ms
62,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

a, b, c=int(input()), int(input()), int(input())
di=b+c-a
err=10**(-7)
flag=True

for i in range(2, di):
  par=i-1
  for j in range(par):
    AB, AC, BD, DE, EC=b, c, 1+j, a, i-j-1
    BC, BE, DC=BD+DE+EC, BD+DE, DE+EC
    AD=math.sqrt((AB**2*DC+AC**2*BD-BC*BD*DC)/(BC))
    AE=math.sqrt((AB**2*EC+AC**2*BE-BC*BE*EC)/(BC))
    cos_BAD=(AB**2+AD**2-BD**2)/(2*AB*AD)
    cos_EAC=(AE**2+AC**2-EC**2)/(2*AE*AC)
    if abs(cos_BAD-cos_EAC)<=err and flag:
      print("Yes")
      flag=False

if flag:
  print("No")
0