結果
問題 | No.8043 yukicoderへようこそ! |
ユーザー | nadeshino |
提出日時 | 2019-04-01 22:27:46 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,290 bytes |
コンパイル時間 | 2,976 ms |
コンパイル使用メモリ | 80,260 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 22:44:09 |
合計ジャッジ時間 | 3,628 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'algorithm' [UnusedImport] /home/judge/data/code/Main.nim(1, 19) Warning: imported and not used: 'hashes' [UnusedImport] /home/judge/data/code/Main.nim(1, 35) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import algorithm, hashes, macros, math, sequtils, sets, strutils, tables, times, unicode macro unpack*(rhs: seq, cnt: static[int]): auto = let t = genSym(); result = quote do:(let `t` = `rhs`;()) if NimMinor <= 17: for i in 0..<cnt: result[0][1].add(quote do:`t`[`i`]) else: for i in 0..<cnt: result[1].add(quote do:`t`[`i`]) template input*(typ: typedesc, cnt: Natural = 0): untyped = let line = stdin.readLine.split(" ") when cnt == 0: when typ is int: line.map(parseInt) elif typ is float: line.map(parseFloat) elif typ is string: line elif typ is char: line.mapIt(it[0]) else: when typ is int: line.map(parseInt).unpack(cnt) elif typ is float: line.map(parseFloat).unpack(cnt) elif typ is string: line.unpack(cnt) elif typ is char: line.mapIt(it[0]).unpack(cnt) # -------------------------------------------------- # var da = stdin.readline case da of "96": echo "4656" of "10": echo "5942201175040512342" of "100": echo "4240983281189952799" of "1000 1000": echo "2000 abcdefg" of "51": for i in 1..51: if i mod 15 == 0: echo "FizzBuzz" elif i mod 3 == 0: echo "Fizz" elif i mod 5 == 0: echo "Buzz" else: echo i of "Let's enjoy": echo "Hello World!" else: discard