結果
| 問題 | 
                            No.105 arcの六角ボルト
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-01-29 03:03:31 | 
| 言語 | Nim  (2.2.0)  | 
                    
| 結果 | 
                             
                                CE
                                 
                             
                            
                            (最新)
                                AC
                                 
                             
                            (最初)
                            
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 887 bytes | 
| コンパイル時間 | 843 ms | 
| コンパイル使用メモリ | 65,040 KB | 
| 最終ジャッジ日時 | 2024-11-14 21:13:09 | 
| 合計ジャッジ時間 | 1,179 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、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:
    # echo f
    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) / PI * 180.0
  tMin = -(tMin + 30.0) mod 59.9999999999
  printFloat(tMin)