結果

問題 No.740 幻の木
ユーザー varrhovarrho
提出日時 2019-09-27 21:00:10
言語 Nim
(2.0.0)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 4,779 ms
コンパイル使用メモリ 65,636 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 01:18:30
合計ジャッジ時間 5,408 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 6 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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
0