結果

問題 No.304 鍵(1)
コンテスト
ユーザー piconic_X
提出日時 2015-11-28 00:18:41
言語 OCaml
(5.4.1)
コンパイル:
ocamlfind ocamlopt -linkpkg -package zarith,str _filename_ -o a.out
実行:
./a.out
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 244 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,070 ms
コンパイル使用メモリ 22,284 KB
実行使用メモリ 28,964 KB
平均クエリ数 309.17
最終ジャッジ日時 2026-03-31 11:02:27
合計ジャッジ時間 1,807 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

let rec output i =
  if i > 999 then output 0 else
    let judge = read_line () in
    if judge = "locked" then (Printf.printf "%03d" i; print_newline (); output (i+1))
    else exit 0

let () = Printf.printf "000"; print_newline ();
	 output 1
0