結果
問題 | No.740 幻の木 |
ユーザー |
|
提出日時 | 2019-09-27 21:00:10 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 244 bytes |
コンパイル時間 | 3,040 ms |
コンパイル使用メモリ | 67,000 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 20:22:41 |
合計ジャッジ時間 | 3,721 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
import sequtils, strutils var n: seq[int] = stdin.readline.split.map(parseInt) ans: int = 0 while n[0] > 0: var i: int = (ans mod 12) + 1 if n[2] <= i and i < n[2] + n[3]: n[0] -= 2 * n[1] else: n[0] -= n[1] ans.inc echo ans