結果

問題 No.35 タイパー高橋
ユーザー tottoripapertottoripaper
提出日時 2014-11-24 06:17:17
言語 Haskell
(9.8.2)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 407 bytes
コンパイル時間 12,494 ms
コンパイル使用メモリ 162,284 KB
実行使用メモリ 15,464 KB
最終ジャッジ日時 2023-08-30 22:42:19
合計ジャッジ時間 2,565 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
14,340 KB
testcase_01 AC 22 ms
14,344 KB
testcase_02 AC 23 ms
15,376 KB
testcase_03 AC 32 ms
15,464 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 #

import Control.Applicative
import Control.Monad
import Data.List (foldl')
import Text.Printf

main = do
  n <- readLn
  ts <- replicateM n $ words <$> getLine
  let
    f (t:s:_) = (s'-missed, missed)
      where
        t' = read t
        s' = length s
        missed = max (s'-12*t'`div`1000) 0
    (a, b) = foldl' (\(a,b) (c,d) -> (a+c,b+d)) (0, 0) $ map f ts
   in printf "%d %d\n" a b
0