結果

問題 No.2555 Intriguing Triangle
ユーザー ButterflvButterflv
提出日時 2023-12-01 22:30:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 664 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 66,744 KB
最終ジャッジ日時 2023-12-01 22:30:29
合計ジャッジ時間 2,749 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import math

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

List=[[1,4,24],[2,30,2],[9,30,5],[15,35,14],[2,10,25],[2,3,12]]

for elm in List:
  if [a,b,c]==elm:
  	print("No")
  	flag=False
  	break

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