結果

問題 No.279 木の数え上げ
ユーザー shikatsusanshikatsusan
提出日時 2016-05-14 12:39:05
言語 Haskell
(9.8.2)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 5,994 ms
コンパイル使用メモリ 173,312 KB
実行使用メモリ 58,752 KB
最終ジャッジ日時 2024-04-22 16:20:00
合計ジャッジ時間 4,665 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,248 KB
testcase_02 AC 2 ms
5,248 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 176 ms
56,576 KB
testcase_11 AC 28 ms
17,664 KB
testcase_12 AC 121 ms
48,512 KB
testcase_13 AC 16 ms
12,928 KB
testcase_14 AC 186 ms
58,752 KB
testcase_15 AC 157 ms
53,504 KB
testcase_16 AC 139 ms
50,432 KB
testcase_17 AC 165 ms
56,704 KB
testcase_18 AC 75 ms
32,128 KB
testcase_19 AC 167 ms
55,680 KB
testcase_20 AC 180 ms
57,728 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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:45: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
    The prefix use of a ‘$’ would denote an untyped splice
      were the TemplateHaskell extension enabled.
    Suggested fix: Add whitespace after the ‘$’.
  |
5 |       exe (x:xs) ws = (length .filter (==x) $ws)
  |                                             ^

Main.hs:8:61: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
    The prefix use of a ‘$’ would denote an untyped splice
      were the TemplateHaskell extension enabled.
    Suggested fix: Add whitespace after the ‘$’.
  |
8 |   print . minimum $ (exe "tr" ws) ++ (map (`div` 2).exe "e" $ws) 
  |                                                             ^
[2 of 2] Linking a.out

ソースコード

diff #

main::IO()
main = do
  ws <-getLine
  let exe [] _=[]
      exe (x:xs) ws = (length .filter (==x) $ws)
                      :exe xs ws

  print . minimum $ (exe "tr" ws) ++ (map (`div` 2).exe "e" $ws) 
0