結果

問題 No.304 鍵(1)
ユーザー kuwakuwa
提出日時 2015-12-05 22:03:18
言語 Haskell
(9.8.2)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 847 ms
コンパイル使用メモリ 159,444 KB
実行使用メモリ 25,540 KB
平均クエリ数 309.17
最終ジャッジ日時 2023-09-23 22:16:18
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
23,460 KB
testcase_01 AC 32 ms
24,084 KB
testcase_02 AC 74 ms
25,540 KB
testcase_03 AC 32 ms
23,856 KB
testcase_04 AC 56 ms
23,812 KB
testcase_05 AC 30 ms
23,988 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Control.Monad
import System.IO

main :: IO ()
main = do
  let loop x = do
        let xStr = show x
            out = drop (length xStr) $ "000" ++ xStr
        putStrLn out
        hFlush stdout
        response <- getLine
        unless (response == "unlocked") $ loop (x+1)

  loop 0
0