結果
| 問題 | No.46 はじめのn歩 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-30 06:41:16 |
| 言語 | Nim (2.2.8) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,032 bytes |
| 記録 | |
| コンパイル時間 | 586 ms |
| コンパイル使用メモリ | 70,016 KB |
| 最終ジャッジ日時 | 2026-03-19 18:51:57 |
| 合計ジャッジ時間 | 931 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、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, 26) Error: tuple expected for tuple unpacking, but got 'seq[int]'
ソースコード
##### //// 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)