結果

問題 No.2555 Intriguing Triangle
ユーザー ButterflvButterflv
提出日時 2023-12-01 10:34:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 524 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 66,744 KB
最終ジャッジ日時 2023-12-01 13:42:07
合計ジャッジ時間 2,536 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import math

a, b, c=int(input()), int(input()), int(input())
di=b+c-a
err=10**(-16)
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