結果

問題 No.105 arcの六角ボルト
ユーザー yaoshimaxyaoshimax
提出日時 2015-03-11 01:47:11
言語 Python2
(2.7.18)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 485 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 6,700 KB
実行使用メモリ 6,404 KB
最終ジャッジ日時 2023-09-06 23:13:15
合計ジャッジ時間 946 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

from math import pi,atan2
T=int(raw_input())
for i in range(T):
    raw_input()
    points=[map(float,raw_input().split()) for j in range(6)]
    cx,cy=0,0
    for j in range(6):
        cx+=points[j][0]
        cy+=points[j][1]
    cx/=6
    cy/=6
    #print cx,cy
    ans=60
    for j in range(6):
        points[j][0]-=cx
        points[j][1]-=cy
        s=atan2(points[j][1],points[j][0])
        if(s>-1e-10):
            ans=min(ans,s*360/2/pi)
    print "{0:.16f}".format(ans)

0