repl.it
@sclanc20/

4.4. For: Sum of N numbers

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
# Clue: You can put a = int(input()) inside a for loop to read multiple values
# Read an integer:
# a = int(input())
# Print a value:
# print(a)

N=int(input())
answer=0
for i in range(N):
    N=int(input())
    answer+=N
print(answer)
Fetching token
?