Adding some more judges, here and there.
[and.git] / NEERC / xtra / xtra_md.hs
blob6f5483f331591f760e4f2d084c8db0b0204ed643
1 module Main where
3 import IO
5 main = do
6 hSetBuffering stdin LineBuffering
7 process 0
9 process sum = do
10 query <- getLine
11 let n = read query
12 if (n > 0)
13 then do let sum' = sum + n
14 putStrLn $ show sum'
15 hFlush stdout
16 process sum'
17 else do putStr ""