cp-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub kobejean/cp-library

:warning: cp_library/math/series/arthsum_fn.py

Code

import cp_library.math.series.__header__

def arthsum(d, a, n):
    return ((n-1)*d+(a<<1))*n >> 1
'''
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
             https://kobejean.github.io/cp-library               
'''

def arthsum(d, a, n):
    return ((n-1)*d+(a<<1))*n >> 1
Back to top page