結果

問題 No.105 arcの六角ボルト
ユーザー nbisconbisco
提出日時 2017-01-17 23:18:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 181 ms / 5,000 ms
コード長 613 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 8,852 KB
最終ジャッジ日時 2023-08-24 16:42:56
合計ジャッジ時間 896 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 181 ms
8,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

def str2float(x):
    thresh = 14
    if x[0] == "-":
        thresh += 1
    xs = x[0:thresh]
    if set(xs.replace("-","").replace(".","")) == set("0"):
        return 0.0
    else:
        return float(xs)

def solver():
    x0 = 0
    y0 = 0
    for i in range(6):
        x, y = map(str2float, input().split(" "))
        if (x > 0 and y >= 0) and (x > x0):
            x0 = x
            y0 = y
            if y == 0.0:
                x0 = 1.0
    return math.acos(x0)*180.0/math.pi

T = int(input())
ans = []
for i in range(T):
    input()
    ans.append(solver())

for i in ans:
    print(i)
0