結果

問題 No.509 塗りつぶしツール
ユーザー くれちーくれちー
提出日時 2017-04-28 22:54:18
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 1,822 ms
コンパイル使用メモリ 158,244 KB
実行使用メモリ 6,996 KB
最終ジャッジ日時 2023-10-11 19:34:04
合計ジャッジ時間 3,274 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 3 ms
6,856 KB
testcase_02 AC 3 ms
6,884 KB
testcase_03 AC 2 ms
6,996 KB
testcase_04 AC 2 ms
6,920 KB
testcase_05 AC 3 ms
6,820 KB
testcase_06 AC 2 ms
6,816 KB
testcase_07 AC 2 ms
6,820 KB
testcase_08 AC 3 ms
6,888 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 3 ms
6,876 KB
testcase_11 AC 3 ms
6,876 KB
testcase_12 AC 2 ms
6,920 KB
testcase_13 AC 3 ms
6,972 KB
testcase_14 WA -
testcase_15 AC 2 ms
6,936 KB
testcase_16 AC 3 ms
6,816 KB
testcase_17 AC 3 ms
6,892 KB
testcase_18 WA -
testcase_19 AC 3 ms
6,880 KB
testcase_20 AC 2 ms
6,940 KB
testcase_21 AC 3 ms
6,872 KB
testcase_22 AC 2 ms
6,932 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 2 ms
6,872 KB
testcase_26 AC 2 ms
6,820 KB
testcase_27 WA -
testcase_28 AC 3 ms
6,888 KB
testcase_29 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

main :: IO ()
main = print . solve =<< getLine

table :: [Int]
table = [1, 0, 0, 0, 1, 0, 1, 0, 2, 1]

solve :: String -> Int
solve s = 1 + t2 + t1 + 1 + t2
    where
        t1 = length s
        t2 = sum . map ((table !!) . read . pure) $ s
0