結果

問題 No.35 タイパー高橋
ユーザー Michae'GonMichae'Gon
提出日時 2015-04-22 19:01:40
言語 Haskell
(9.8.2)
結果
AC  
実行時間 22 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 878 ms
コンパイル使用メモリ 164,416 KB
実行使用メモリ 11,404 KB
最終ジャッジ日時 2023-09-18 08:20:28
合計ジャッジ時間 1,637 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
11,348 KB
testcase_01 AC 12 ms
11,328 KB
testcase_02 AC 22 ms
11,404 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

ソースコード

diff #

main = getLine >> getContents >>= prints . solve . map (reads . words) . lines
        where
        prints (a, b) = putStrLn $ show a ++ " " ++ show b
        reads [t, s] = (read t, length s)

solve :: [(Int, Int)] -> (Int, Int)
solve = foldl ff (0, 0)
        where
        ff (x, y) (t, s)
                | a t > s = (x + s, y)
                | otherwise = (x + a t, y + s - a t)
        a t = div (12 * t) 1000
0