結果

問題 No.2555 Intriguing Triangle
ユーザー navel_tosnavel_tos
提出日時 2023-12-01 03:06:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 492 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 64,424 KB
最終ジャッジ日時 2023-12-01 13:41:31
合計ジャッジ時間 2,345 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,588 KB
testcase_01 AC 37 ms
53,588 KB
testcase_02 AC 38 ms
53,588 KB
testcase_03 AC 37 ms
53,588 KB
testcase_04 AC 42 ms
59,984 KB
testcase_05 AC 36 ms
53,588 KB
testcase_06 AC 36 ms
53,588 KB
testcase_07 AC 36 ms
53,588 KB
testcase_08 AC 40 ms
53,588 KB
testcase_09 AC 38 ms
53,588 KB
testcase_10 AC 46 ms
62,340 KB
testcase_11 AC 48 ms
62,372 KB
testcase_12 WA -
testcase_13 AC 46 ms
62,296 KB
testcase_14 WA -
testcase_15 AC 43 ms
60,248 KB
testcase_16 AC 41 ms
59,608 KB
testcase_17 AC 36 ms
53,588 KB
testcase_18 AC 38 ms
53,588 KB
testcase_19 AC 35 ms
53,588 KB
testcase_20 AC 36 ms
53,588 KB
testcase_21 AC 50 ms
64,424 KB
testcase_22 AC 36 ms
53,588 KB
testcase_23 AC 35 ms
53,588 KB
testcase_24 WA -
testcase_25 AC 42 ms
59,600 KB
testcase_26 AC 41 ms
59,648 KB
testcase_27 AC 40 ms
59,652 KB
testcase_28 AC 36 ms
53,588 KB
testcase_29 AC 43 ms
60,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#べつに誤差評価すればいいのか?

import math
a,b,c = [int(input()) for _ in range(3)]
for z in range(2+a,b+c):
  for x in range(1,z+1):
    y = z-a-x
    if y < 1: continue
    sqR = b**2 + x**2 - (b**2 + z**2 - c**2) * x / z
    sqS = c**2 + y**2 - (c**2 + z**2 - b**2) * y / z
    R,S = math.sqrt(sqR), math.sqrt(sqS)
    if abs((b**2 + sqR - x**2) * 2 * c * S - (c**2 + sqS - y**2) * 2 * b * R ) < 1e-12:
      if b+z > c and c+z > b: print('Yes'); exit()
      
print('No')
0