結果
| 問題 | 
                            No.105 arcの六角ボルト
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-01-29 03:18:20 | 
| 言語 | Nim  (2.2.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 24 ms / 5,000 ms | 
| コード長 | 825 bytes | 
| コンパイル時間 | 2,513 ms | 
| コンパイル使用メモリ | 60,792 KB | 
| 実行使用メモリ | 6,816 KB | 
| 最終ジャッジ日時 | 2024-07-01 11:06:21 | 
| 合計ジャッジ時間 | 2,883 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils,math
template times*(n:int,body) = (for _ in 0..<n: body)
template `min=`*(x,y) = x = min(x,y)
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}
proc printf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc scan(): int =
  while true:
    let k = getchar_unlocked()
    if k < '0': return
    result = 10 * result + k.ord - '0'.ord
proc printFloat(f:float) =
  if f < 1e-8: printf("0.0\n")
  else: printf("%f\n", f)
scan().times:
  var x,y:float
  var xMin = 500.0
  var yMin : float
  for i in 0..<6:
    scanf("%lf %lf\n",addr x,addr y)
    if x < xMin :
      xMin = x
      yMin = y
  const toRad = 1.0 / PI * 180.0
  let tMin = -(arctan2(xMin,yMin) * toRad + 30.0) mod 59.9999999999
  printFloat(tMin)