3 ms·
I would've went with Haskell myself ;) main :: IO () main = writeListAsLines . toDoubleList . lines =<< readFile "nums.txt" where
by biscarch 13y ago
I would've went with Haskell myself ;)
main :: IO ()
main = writeListAsLines . toDoubleList . lines =<< readFile "nums.txt"
where
toDoubleList y = zipWith (*) (map read y) [1..length y]
writeListAsLines z = writeFile "output.txt" (concat $ intersperse "\n" $ map show z)