zjfz-2019-s402281/intro/Task104.py
2020-01-12 13:16:55 +01:00

17 lines
317 B
Python

#!/usr/bin/python2
# -*- coding: utf-8 -*-
"""Rozwiązanie zadania 104."""
def sum_from_one_to_n(number):
"""Placeholder"""
if number < 1:
return 0
ret = 0
for ile in range(1, number + 1):
ret += ile * ile
return ret
if __name__ == '__main__':
print sum_from_one_to_n(2015)