結果

問題 No.21 平均の差
ユーザー むらためむらため
提出日時 2017-07-29 17:15:22
言語 Nim
(2.0.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 243 bytes
コンパイル時間 811 ms
コンパイル使用メモリ 66,708 KB
最終ジャッジ日時 2024-04-27 02:28:21
合計ジャッジ時間 1,185 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 41) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
/home/judge/data/code/Main.nim(9, 16) template/generic instantiation of `newSeq` from here
/home/linuxbrew/.linuxbrew/Cellar/nim/2.0.2/nim/lib/system/seqs_v2.nim(139, 9) template/generic instantiation of `shrink` from here
/home/linuxbrew/.linuxbrew/Cellar/nim/2.0.2/nim/lib/system/seqs_v2.nim(84, 13) template/generic instantiation of `setLen` from here
/home/linuxbrew/.linuxbrew/Cellar/nim/2.0.2/nim/lib/system/seqs_v2.nim(126, 18) template/generic instantiation of `len` from here
/home/linuxbrew/.linuxbrew/Cellar/nim/2.0.2/nim/lib/system.nim(707, 13) Error: invalid type: 'None' in this context: 'proc (x: seq[None]): int{.noSideEffect, gcsafe.}' for proc

ソースコード

diff #

import sequtils,strutils,algorithm,math,future
template get():string = stdin.readLine()
template int(s:string) :int = s.parseInt()


let
  N = get().int
  K = get().int
  nums = newSeq[int](N)
    .map(x => get().int)
echo nums.max - nums.min
0