Two numbers A and B are given. You need to calculate their sum A + B. In this task you need to read from the file and display the answer to the file
The first line of the input file contains numbers a and b separated by a space
In the only row of the output file, output the number A +
on Python !!!
def main (): With Open ('input.txt') AS F: Nums = F.Read (). Split () A, B = MAP (Int, Nums) result = a + b With Open ('Output.txt', 'W') AS F: F.Write (STR (RESULT)) if __name__ == '__main__': Main ()