結果
問題 | No.164 ちっちゃくないよ!! |
ユーザー | ducktail |
提出日時 | 2018-05-21 22:38:10 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 1,434 ms |
コンパイル使用メモリ | 166,304 KB |
実行使用メモリ | 9,772 KB |
最終ジャッジ日時 | 2023-09-11 01:06:10 |
合計ジャッジ時間 | 2,478 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
6,736 KB |
testcase_01 | AC | 2 ms
6,868 KB |
testcase_02 | AC | 2 ms
6,900 KB |
testcase_03 | AC | 2 ms
6,804 KB |
testcase_04 | AC | 3 ms
6,960 KB |
testcase_05 | AC | 5 ms
9,772 KB |
testcase_06 | AC | 5 ms
9,636 KB |
testcase_07 | AC | 4 ms
8,016 KB |
testcase_08 | AC | 4 ms
8,856 KB |
testcase_09 | AC | 4 ms
8,788 KB |
testcase_10 | AC | 2 ms
7,124 KB |
コンパイルメッセージ
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
ソースコード
import Control.Applicative ((<$>)) import Control.Monad (replicateM) import Data.List (foldl') import Data.Char (digitToInt, ord) main :: IO () main = do n <- readLn solve <$> replicateM n getLine >>= print solve :: [String] -> Int solve ss = minimum . map f $ ss where f s = foldl' (\x y -> n * x + y) 0 ls where ls = map toNum s n = 1 + maximum ls toNum c | c <= '9' = digitToInt c | otherwise = ord c - 55