結果

問題 No.304 鍵(1)
ユーザー むらためむらため
提出日時 2018-12-18 11:40:32
言語 Nim
(2.0.2)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 6,234 ms
コンパイル使用メモリ 75,976 KB
実行使用メモリ 24,252 KB
平均クエリ数 309.17
最終ジャッジ日時 2023-09-24 02:02:22
合計ジャッジ時間 7,351 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
23,472 KB
testcase_01 AC 38 ms
24,252 KB
testcase_02 AC 71 ms
23,340 KB
testcase_03 AC 39 ms
23,448 KB
testcase_04 AC 55 ms
23,424 KB
testcase_05 AC 42 ms
23,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import strformat,strutils

import osproc
var p = 0
if execCmdEx("test -f hoge").exitCode == 0:
  p = execProcess("cat hoge").strip().parseInt()
  discard execProcess(fmt"echo {p + 1} > hoge")
else:
  discard execProcess("echo 0 > hoge")

# (000 ~ 999)
for i in 0..999:
  echo fmt"{i:03d}"
  if stdin.readLine() == "unlocked": break
0