結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,588 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
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 36 ms
53,588 KB
testcase_09 AC 38 ms
53,588 KB
testcase_10 AC 38 ms
53,588 KB
testcase_11 AC 47 ms
62,372 KB
testcase_12 WA -
testcase_13 AC 45 ms
62,296 KB
testcase_14 AC 37 ms
53,588 KB
testcase_15 AC 43 ms
60,248 KB
testcase_16 AC 41 ms
59,612 KB
testcase_17 AC 38 ms
53,588 KB
testcase_18 WA -
testcase_19 AC 36 ms
53,588 KB
testcase_20 AC 37 ms
53,588 KB
testcase_21 AC 49 ms
64,424 KB
testcase_22 WA -
testcase_23 AC 37 ms
53,588 KB
testcase_24 AC 38 ms
53,588 KB
testcase_25 AC 37 ms
53,588 KB
testcase_26 AC 40 ms
59,652 KB
testcase_27 AC 40 ms
59,652 KB
testcase_28 AC 37 ms
53,588 KB
testcase_29 AC 44 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-15:
      print('Yes'); exit()
      
print('No')
0