結果
| 問題 | 
                            No.105 arcの六角ボルト
                             | 
                    
| コンテスト | |
| ユーザー | 
                             yaoshimax
                         | 
                    
| 提出日時 | 2015-03-11 01:47:11 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 140 ms / 5,000 ms | 
| コード長 | 485 bytes | 
| コンパイル時間 | 418 ms | 
| コンパイル使用メモリ | 7,040 KB | 
| 実行使用メモリ | 6,784 KB | 
| 最終ジャッジ日時 | 2024-06-24 17:14:25 | 
| 合計ジャッジ時間 | 1,379 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
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)
            
            
            
        
            
yaoshimax