Cod sursa(job #3184825)

Utilizator dasj19Daniel Serbanescu dasj19 Data 16 decembrie 2023 23:59:04
Problema A+B Scor 0
Compilator py Status done
Runda Arhiva de probleme Marime 0.49 kb
# Open the input file containing two numbers, each on its own line.
fin = open("adunare.in", "r")
# Open the output file for writing.
fout = open("adunare.out", "w")
# Read the input file and split at linebreak, saving the resulting array.
content = fin.read().splitlines()
# Store the first two values.
a = int(content[0])
b = int(content[1])
# Write to the output file the string representation of the sum of the two values.
fout.write(str(a+b))
# Close the used resources.
fin.close()
fout.close()