17 lines
317 B
Python
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)
|