結果
問題 | No.35 タイパー高橋 |
ユーザー | tjnt |
提出日時 | 2021-07-29 04:37:37 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 446 bytes |
コンパイル時間 | 10,030 ms |
コンパイル使用メモリ | 167,132 KB |
実行使用メモリ | 11,324 KB |
最終ジャッジ日時 | 2023-10-12 03:10:19 |
合計ジャッジ時間 | 3,160 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 12 ms
11,304 KB |
testcase_01 | AC | 12 ms
11,324 KB |
testcase_02 | AC | 23 ms
11,308 KB |
testcase_03 | AC | 22 ms
11,280 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
ソースコード
solve :: [(Int,String)] -> (Int,Int) solve = foldl f (0,0) where k = 12 f (a,b) (t,s) = let m = 12 * t `div` 1000 l = length s in (a + min m l, b + max (l-m) 0) main :: IO () main = do n <- readLn :: IO Int xs <- map ((\[a,b] -> (read a, b)) . words) . lines <$> getContents :: IO [(Int,String)] let res = solve xs putStrLn . unwords . map show $ [fst res, snd res]