|
|
back to boardDiscussion of Problem 1068. SumPython 3 solution without loops Posted by ZEMlan 12 Jul 2018 19:15 n = int(input()) if n > 0: print(int(n*(n+1)/2)) elif n == 0: print('1') else: print(int(n*(n-1)/-2 + 1)) Re: Python 3 solution without loops Posted by Artem 13 May 2019 00:07 thanks |
|
|