Submission #1177366
Source Code Expand
import Data.List import Data.Maybe main :: IO () main = do line <- getLine -- let line = "AZZ" putStrLn $ solve line solve :: String -> String solve s = show $ len - indA - indZ' where len = length s indA = fromJust $ elemIndex 'A' s indZ' = fromJust $ elemIndex 'Z' $ reverse s
Submission Info
Submission Time | |
---|---|
Task | B - A to Z String |
User | ykarako |
Language | Haskell (GHC 7.10.3) |
Score | 200 |
Code Size | 336 Byte |
Status | AC |
Exec Time | 38 ms |
Memory | 16252 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt |
All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 1 ms | 380 KB |
00_example_02.txt | AC | 1 ms | 380 KB |
00_example_03.txt | AC | 1 ms | 380 KB |
01.txt | AC | 31 ms | 13692 KB |
02.txt | AC | 26 ms | 12668 KB |
03.txt | AC | 16 ms | 7548 KB |
04.txt | AC | 15 ms | 7548 KB |
05.txt | AC | 37 ms | 16124 KB |
06.txt | AC | 38 ms | 16124 KB |
07.txt | AC | 37 ms | 16252 KB |
08.txt | AC | 37 ms | 16124 KB |
09.txt | AC | 37 ms | 16124 KB |