結果
問題 | No.279 木の数え上げ |
ユーザー |
|
提出日時 | 2016-03-16 09:15:38 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 187 ms / 2,000 ms |
コード長 | 194 bytes |
コンパイル時間 | 6,652 ms |
コンパイル使用メモリ | 172,160 KB |
実行使用メモリ | 59,136 KB |
最終ジャッジ日時 | 2024-10-14 15:26:05 |
合計ジャッジ時間 | 8,855 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) Main.hs:5:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in one further location. Suggested fix: Please use spaces instead. | 5 | [t,r,e] <- getLine >>= return . (\xs -> map (count xs) "tre") | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
count :: Eq a => [a] -> a -> Integer count xs c = sum $ map (\x -> if x==c then 1 else 0) xs main = do [t,r,e] <- getLine >>= return . (\xs -> map (count xs) "tre") print$minimum[t,r,e`div`2]