結果

問題 No.5 数字のブロック
ユーザー karrym_karrym_
提出日時 2015-06-27 21:13:44
言語 Haskell
(9.8.2)
結果
RE  
実行時間 -
コード長 299 bytes
コンパイル時間 5,491 ms
コンパイル使用メモリ 156,764 KB
実行使用メモリ 13,592 KB
最終ジャッジ日時 2023-09-22 03:22:25
合計ジャッジ時間 7,641 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,188 KB
testcase_01 AC 3 ms
7,212 KB
testcase_02 RE -
testcase_03 AC 23 ms
13,176 KB
testcase_04 AC 22 ms
12,108 KB
testcase_05 AC 23 ms
13,200 KB
testcase_06 AC 22 ms
12,380 KB
testcase_07 AC 22 ms
12,228 KB
testcase_08 AC 22 ms
12,632 KB
testcase_09 AC 12 ms
11,724 KB
testcase_10 AC 32 ms
13,176 KB
testcase_11 AC 23 ms
12,112 KB
testcase_12 AC 22 ms
13,176 KB
testcase_13 AC 23 ms
13,312 KB
testcase_14 AC 3 ms
7,856 KB
testcase_15 AC 4 ms
8,544 KB
testcase_16 AC 33 ms
13,136 KB
testcase_17 AC 32 ms
13,464 KB
testcase_18 AC 32 ms
13,276 KB
testcase_19 AC 32 ms
13,592 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 3 ms
7,196 KB
testcase_24 AC 4 ms
8,804 KB
testcase_25 AC 6 ms
10,304 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 23 ms
12,140 KB
testcase_30 AC 12 ms
11,596 KB
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

module Main where

import Data.List

solve :: [Int] -> Int -> Int
solve (x:xs) y | y < x = 0
               | otherwise = 1 + solve xs (y - x)

main :: IO ()
main = do
        l <- read <$> getLine
        _ <- getLine
        ws <- (map read . words) <$> getLine
        print $ solve (sort ws) l
0