結果

問題 No.2555 Intriguing Triangle
ユーザー titiatitia
提出日時 2023-12-01 04:59:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 736 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2023-12-01 13:41:35
合計ジャッジ時間 2,292 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,112 KB
testcase_01 AC 36 ms
10,112 KB
testcase_02 AC 34 ms
10,112 KB
testcase_03 AC 34 ms
10,112 KB
testcase_04 AC 35 ms
10,112 KB
testcase_05 AC 32 ms
10,112 KB
testcase_06 AC 32 ms
10,112 KB
testcase_07 AC 32 ms
10,112 KB
testcase_08 AC 38 ms
10,112 KB
testcase_09 AC 36 ms
10,112 KB
testcase_10 AC 49 ms
10,112 KB
testcase_11 AC 48 ms
10,112 KB
testcase_12 AC 52 ms
10,112 KB
testcase_13 AC 49 ms
10,112 KB
testcase_14 AC 52 ms
10,112 KB
testcase_15 AC 41 ms
10,112 KB
testcase_16 AC 37 ms
10,112 KB
testcase_17 AC 33 ms
10,112 KB
testcase_18 AC 34 ms
10,112 KB
testcase_19 AC 33 ms
10,112 KB
testcase_20 AC 73 ms
10,112 KB
testcase_21 AC 72 ms
10,112 KB
testcase_22 AC 32 ms
10,112 KB
testcase_23 AC 33 ms
10,112 KB
testcase_24 AC 33 ms
10,112 KB
testcase_25 AC 35 ms
10,112 KB
testcase_26 AC 37 ms
10,112 KB
testcase_27 AC 39 ms
10,112 KB
testcase_28 AC 32 ms
10,112 KB
testcase_29 AC 38 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt

a=int(input())
b=int(input())
c=int(input())

flag=0

for x in range(1,100):
    for y in range(1,100):

        if x+y+a>=b+c:
            continue

        a2=a+x+y

        if b*b+x*x-(a2*a2+b*b-c*c)*x/a2>0:
            k=sqrt(b*b+x*x-(a2*a2+b*b-c*c)*x/a2)
        else:
            continue

        if c*c+y*y-(a2*a2+c*c-b*b)*y/a2>0:
            l=sqrt(c*c+y*y-(a2*a2+c*c-b*b)*y/a2)
        else:
            continue

        if k>=l+a or l>=a+k or a>=k+l:
            continue

        f1=(b*b+k*k-x*x)/(b*k)
        f2=(c*c+l*l-y*y)/(c*l)

        #print(x,y,f1,f2)

        if abs(f1-f2)<10**(-7):
            flag=1

if flag==1:
    print("Yes")
else:
    print("No")
    

        

        

        
0