Forezz

ДЗ 10 Н 4

Aug 1st, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def summ(a, i):
  2.     if i == len(a) - 1:
  3.         return a[i]
  4.     else:
  5.         return a[i] + summ(a, i + 1)
  6.                
  7. print(summ(list(map(int,input().split())), 0))
Advertisement
Add Comment
Please, Sign In to add comment