import Control.Applicative import Control.Monad import Data.List.Split (splitOn) main :: IO () main = do n <- readLn solve <$> replicateM n getLine >>= prt solve :: [String] -> Integer solve ss = sum . map f $ ss where f s = case splitOn "." s of [a] -> read a * 10 ^ 10 [a, b] -> let ib = read (b ++ replicate (10 - length b) '0') in if head a == '-' then negate (10 ^ 10 * read (tail a) + ib) else 10 ^ 10 * read a + ib prt :: Integer -> IO () prt x = do let sx = show x l = length sx (a, b) = splitAt (l - 10) sx putStrLn $ a ++ "." ++ b