結果

問題 No.2555 Intriguing Triangle
コンテスト
ユーザー Nikkuniku029
提出日時 2023-12-01 18:10:58
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 688 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 261 ms
コンパイル使用メモリ 85,632 KB
実行使用メモリ 68,608 KB
最終ジャッジ日時 2026-04-13 18:07:40
合計ジャッジ時間 6,833 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a = int(input())
b = int(input())
c = int(input())
ans = "No"
for x in range(1, 200):
    for y in range(1, 200):
        z = x + y + a
        if not z < b + c:
            continue
        if not b < c + z:
            continue
        if not c < b + z:
            continue
        cosB = (b**2 + z**2 - c**2) / (2 * b * z)
        p = (b**2 + x**2 - 2 * b * x * cosB) ** 0.5
        costheta = (b**2 + p**2 - x**2) / (2 * b * p)
        cosC = (c**2 + z**2 - b**2) / (2 * c * z)
        q = (c**2 + y**2 - 2 * c * y * cosC) ** 0.5
        cosphi = (c**2 + q**2 - y**2) / (2 * c * q)
        EPS = 10 ** (-6)
        if abs(costheta - cosphi) < EPS:
            ans = "Yes"
print(ans)
0