結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー nbisco
提出日時 2017-01-17 23:18:14
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 613 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 114 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 12,032 KB
最終ジャッジ日時 2026-10-15 05:14:52
合計ジャッジ時間 1,330 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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