Submission #532947


Source Code Expand

import Data.List (isPrefixOf)

main :: IO ()
main = mapM_ (print . solve) . tail . lines =<< getContents

solve :: String -> Int
solve xs | "tokyo" `isPrefixOf` xs || "kyoto" `isPrefixOf` xs = 1 + solve (drop 5 xs)
         | null xs = 0
         | otherwise = solve (tail xs)

Submission Info

Submission Time
Task A - 東京都
User itchyny
Language Haskell (Haskell Platform 2014.2.0.0)
Score 100
Code Size 286 Byte
Status AC
Exec Time 29 ms
Memory 1704 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 29 ms 1672 KB
20_noised_tokyoto.txt AC 29 ms 1672 KB
99_teuchi.txt AC 28 ms 1704 KB