This documentation is automatically generated by online-judge-tools/verification-helper
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