結果

問題 No.105 arcの六角ボルト
コンテスト
ユーザー yaoshimax
提出日時 2015-03-11 01:47:11
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 186 ms / 5,000 ms
コード長 485 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 116 ms
コンパイル使用メモリ 77,664 KB
最終ジャッジ日時 2025-12-03 14:26:04
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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