結果
問題 | No.35 タイパー高橋 |
ユーザー | momen999 |
提出日時 | 2017-04-24 17:29:44 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 554 bytes |
コンパイル時間 | 746 ms |
コンパイル使用メモリ | 161,196 KB |
実行使用メモリ | 15,568 KB |
最終ジャッジ日時 | 2023-10-11 13:11:51 |
合計ジャッジ時間 | 1,524 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 22 ms
13,172 KB |
testcase_01 | AC | 22 ms
13,276 KB |
testcase_02 | AC | 32 ms
15,348 KB |
testcase_03 | AC | 32 ms
15,568 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.Monad rInt :: String -> Int rInt = read fstInt [t, s] = (rInt t, s) solve ts = typing [0,0] ts where typing xy [] = xy typing [x,y] (ts:lts) | tnum > slen = typing [x + slen, y] lts | otherwise = typing [x + tnum, y + (slen - tnum)] lts where tnum = (12 * fst ts) `div` 1000 slen = length $ snd ts main = do n <- readLn ts <- map (fstInt . words) <$> replicateM n getLine let ans = solve ts putStrLn $ unwords $ map show ans