結果
問題 | No.2555 Intriguing Triangle |
ユーザー | navel_tos |
提出日時 | 2023-12-01 21:30:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 53 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 174 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 64,552 KB |
最終ジャッジ日時 | 2023-12-01 21:30:12 |
合計ジャッジ時間 | 2,502 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 37 ms
53,588 KB |
testcase_01 | AC | 39 ms
53,588 KB |
testcase_02 | AC | 37 ms
53,588 KB |
testcase_03 | AC | 36 ms
53,588 KB |
testcase_04 | AC | 42 ms
59,984 KB |
testcase_05 | AC | 35 ms
53,588 KB |
testcase_06 | AC | 35 ms
53,588 KB |
testcase_07 | AC | 35 ms
53,588 KB |
testcase_08 | AC | 42 ms
53,588 KB |
testcase_09 | AC | 37 ms
53,588 KB |
testcase_10 | AC | 46 ms
62,468 KB |
testcase_11 | AC | 47 ms
62,500 KB |
testcase_12 | AC | 51 ms
62,500 KB |
testcase_13 | AC | 49 ms
62,424 KB |
testcase_14 | AC | 53 ms
62,468 KB |
testcase_15 | AC | 46 ms
60,376 KB |
testcase_16 | AC | 43 ms
59,608 KB |
testcase_17 | AC | 35 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 | 48 ms
64,552 KB |
testcase_22 | AC | 35 ms
53,588 KB |
testcase_23 | AC | 35 ms
53,588 KB |
testcase_24 | AC | 35 ms
53,588 KB |
testcase_25 | AC | 40 ms
59,600 KB |
testcase_26 | AC | 38 ms
59,648 KB |
testcase_27 | AC | 38 ms
59,652 KB |
testcase_28 | AC | 36 ms
53,588 KB |
testcase_29 | AC | 42 ms
60,256 KB |
ソースコード
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-8: if b+z > c and c+z > b: print('Yes'); exit() print('No')