結果

問題 No.191 供託金
ユーザー Michae'Gon
提出日時 2015-07-19 04:46:09
言語 Haskell
(9.10.1)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 221 bytes
コンパイル時間 6,444 ms
コンパイル使用メモリ 175,232 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-16 20:56:13
合計ジャッジ時間 7,369 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

main = getLine >> getLine >>= print . solve . map read . words

solve :: [Int] -> Int
solve xs = 30 * foldl (\acc x -> if fromIntegral x <= b then acc + 1 else acc) 0 xs
    where
        b = fromIntegral (sum xs) / 10.0
0