結果
| 問題 | No.2555 Intriguing Triangle | 
| コンテスト | |
| ユーザー |  amentorimaru | 
| 提出日時 | 2023-12-01 02:38:16 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 733 bytes | 
| コンパイル時間 | 207 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 11,264 KB | 
| 最終ジャッジ日時 | 2024-09-26 15:30:31 | 
| 合計ジャッジ時間 | 2,682 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 23 WA * 5 | 
ソースコード
import sys
from fractions import Fraction
input = sys.stdin.readline
def read_values(): return tuple(map(int, input().split()))
def read_list(): return list(map(int, input().split()))
def main():  
    a=int(input())
    b=int(input())
    c=int(input())
    for x in range(1,300):
        for y in range(1,300):   
            aa = a+x+y
            if(aa>=b+c):
                break
            cosb=Fraction(b*b+aa*aa-c*c,2*b*aa)
            cosc=Fraction(c*c+aa*aa-b*b,2*c*aa)
            d2 = c*c+(a+y)*(a+y)-2*c*(a+y)*cosc
            e2 = b*b+(a+x)*(a+x)-2*b*(a+x)*cosb
            if x*x*c*c*e2==b*b*d2*y*y:
                print("Yes")
                return
    print("No")
        
if __name__ == "__main__":
    main()
            
            
            
        