UPD:
n = int(input())
print( (1+n)*n/2)
n = int(input( ))
s = 0
while n>0:
s= s+n
n=n-1
print (s)
Должно работать)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
UPD:
n = int(input())
print( (1+n)*n/2)
n = int(input( ))
s = 0
while n>0:
s= s+n
n=n-1
print (s)
Должно работать)