Submission #2698478


Source Code Expand

import Control.Monad
import Control.Applicative
main = do
    n <- readLn
    list <- replicateM n getLine
    let answer = map solve list
    mapM print answer
solve :: String -> Int
solve = f 0
f :: Int -> String -> Int
f n str = case str of ('t':'o':'k':'y':'o':xs) -> f (n+1) xs
                      ('k':'y':'o':'t':'o':xs) -> f (n+1) xs   
                      (x:xs) -> f n xs
                      "" -> n

Submission Info

Submission Time
Task A - 東京都
User moriiforfun
Language Haskell (GHC 7.10.3)
Score 100
Code Size 428 Byte
Status AC
Exec Time 2 ms
Memory 1276 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 3
Set Name Test Cases
All 10_random_to_kyo.txt, 20_noised_tokyoto.txt, 99_teuchi.txt
Case Name Status Exec Time Memory
10_random_to_kyo.txt AC 2 ms 1148 KB
20_noised_tokyoto.txt AC 2 ms 1276 KB
99_teuchi.txt AC 2 ms 892 KB