<filename>algorithms/sum-01-2.py<gh_stars>1-10
'''
Created on 2018. 4. 26.

@author: lsm
'''
def sum_n(n):
    return n * (n+1) // 2

print (sum_n(10))
print (sum_n(100))
<filename>algorithms/sum-01-2.py<gh_stars>1-10
'''
Created on 2018. 4. 26.

@author: lsm
'''
def sum_n(n):
    return n * (n+1) // 2

print (sum_n(10))
print (sum_n(100))
Created on 2018. 4. 26.  @author: lsm