結果
| 問題 |
No.46 はじめのn歩
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-30 06:41:16 |
| 言語 | Nim (2.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,032 bytes |
| コンパイル時間 | 726 ms |
| コンパイル使用メモリ | 68,608 KB |
| 最終ジャッジ日時 | 2024-06-30 01:54:42 |
| 合計ジャッジ時間 | 1,018 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/judge/data/code/Main.nim(3, 50) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
/home/judge/data/code/Main.nim(22, 22) Error: type mismatch: got 'seq[int]' for 'map(split(readLine(stdin), {' ', '\t', '\v', '\r', '\n', '\f'}, -1), parseInt)' but expected 'tuple'
ソースコード
##### //// include "../template/code.nim"
import sequtils,strutils,strscans,algorithm,math,future,sets
template get():string = stdin.readLine()
template times(n:int,body:untyped): untyped = (for _ in 0..<n: body)
template REP(i:untyped,n:int,body:untyped):untyped =
block:(var i = 0; while i < n:( body; i += 1))
template each[T](arr:var seq[T],elem,body:untyped):untyped =
for _ in 0..<arr.len:(proc (elem:var T):auto = body)(arr[_])
template `+=`(x,y:typed):void = x = x + y
template `-=`(x,y:typed):void = x = x - y
template `*=`(x,y:typed):void = x = x * y
template `/=`(x,y:typed):void = x = x / y
template `%=`(x,y:typed):auto = x = x mod y
template `//=`(x,y:typed):auto = x = x div y
template `*`[T](a: seq[T], n: Natural): T = a.cycle(b) # @[3] * 100
template sort[T](x: openarray[T]): void = x.sort(cmp[T]) # omit cmp
template sorted[T](x: openarray[T]): auto = x.sorted(cmp[T]) # omit cmp
# newSeqWith(4,rand())
# {key: val}.newOrderedTable.
var a,b = 0
(a,b) = get().split().map(parseInt)
echo(ceil(b / a).int)