結果

問題 No.105 arcの六角ボルト
ユーザー むらためむらため
提出日時 2019-01-29 02:50:38
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 726 bytes
コンパイル時間 2,388 ms
コンパイル使用メモリ 66,860 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-14 03:09:56
合計ジャッジ時間 2,920 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 32) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #

import sequtils,algorithm,math,strutils
template times*(n:int,body) = (for _ in 0..<n: body)
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}
proc scan(): int =
  while true:
    let k = getchar_unlocked()
    if k < '0': break
    result = 10 * result + k.ord - '0'.ord
proc printFloat(f:float) =
  if f < 1e-8: echo 0.0
  else: echo f

var T : array[6,float32]

scan().times:
  discard getchar_unlocked()
  for i in 0..<6:
    var x,y:float32
    scanf("%f %f\n",addr x,addr y)
    T[i] = arctan2(x,y) / PI * 180.0
  T.sort(cmp)
  if T[0] < -150.0:  printFloat( -T[0] - 150.0)
  else: printFloat((210.0-T[^1]) mod 59.9999999999)
0