結果
| 問題 |
No.105 arcの六角ボルト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-29 03:10:33 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 875 bytes |
| コンパイル時間 | 2,622 ms |
| コンパイル使用メモリ | 66,412 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-07-01 11:06:14 |
| 合計ジャッジ時間 | 3,074 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'algorithm' [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)
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': break
result = 10 * result + k.ord - '0'.ord
proc printFloat(f:float) =
if f < 1e-8: printf("0.0\n")
else: printf("%.9f\n", f)
scan().times:
discard getchar_unlocked()
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)