結果
| 問題 | No.105 arcの六角ボルト |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-29 03:04:33 |
| 言語 | Nim (2.2.6) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 899 bytes |
| 記録 | |
| コンパイル時間 | 853 ms |
| コンパイル使用メモリ | 66,268 KB |
| 最終ジャッジ日時 | 2024-11-14 21:13:12 |
| 合計ジャッジ時間 | 1,196 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/judge/data/code/Main.nim(6, 16) Error: 'untyped' is only allowed in templates and macros or magic procs
ソースコード
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 puts(str: untyped){.header: "<stdio.h>", varargs.}
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("%f\n", f)
var T : array[6,float]
scan().times:
discard getchar_unlocked()
var tMin = 500.0
for i in 0..<6:
var x,y:float
scanf("%lf %lf\n",addr x,addr y)
tMin .min= arctan2(x,y)
const toRad = 1.0 / PI * 180.0
tMin = -(tMin * toRad + 30.0) mod 59.9999999999
printFloat(tMin)