結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-29 02:50:38 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 726 bytes |
| コンパイル時間 | 3,012 ms |
| コンパイル使用メモリ | 66,280 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-07-01 11:06:05 |
| 合計ジャッジ時間 | 3,438 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
コンパイルメッセージ
/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]
ソースコード
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)