Problem:


Score : 100 points

Problem Statement

There are N children in AtCoder Kindergarten. Mr. Evi will arrange the children in a line, then give 1 candy to the first child in the line, 2 candies to the second child, ..., N candies to the N-th child. How many candies will be necessary in total?

Constraints

1≦N≦100

Input

The input is given from Standard Input in the following format:

N

Output

Print the necessary number of candies in total.

Sample Input 1

3

Sample Output 1

6

The answer is 1+2+3=6.

Sample Input 2

10

Sample Output 2

55

The sum of the integers from 1 to 10 is 55.

Sample Input 3

1

Sample Output 3

1

Only one child. The answer is 1 in this case.



Sample input:
3


Sample output:
6

Submission status: Accepted

Solution code:
def main() -> None:
    N = int(input())
    s = 0
    for i in range(N + 1):
        s += i
    print(s)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

a = []
a = [i for i in range(1, n+1)]
print(sum(a))

Submission status: Accepted

Solution code:
from itertools import combinations, product


def gcd(a, b):
    if a < b:
        a, b = b, a
    while b != 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)


def get(fmt):
    ps = input().split()
    r = []
    for p, t in zip(ps, fmt):
        if t == "i":
            r.append(int(p))
        if t == "f":
            r.append(float(p))
        if t == "s":
            r.append(p)
    if len(r) == 1:
        r = r[0]
    return r

def put(*args, **kwargs):
    print(*args, **kwargs)


def rep(n, f, *args, **kwargs):
    return [f(*args, **kwargs) for _ in range(n)]
    
def rep_im(n, v):
    return rep(n, lambda: v)
    
YES_NO = ["NO", "YES"]


N = get("i")

put(N * (N + 1) // 2)

Submission status: Accepted

Solution code:
n = input()
sum_candy = 0
for i in range(int(n)):
    sum_candy = sum_candy + i +1
print(sum_candy)

Submission status: Accepted

Solution code:
n = [i+1 for i in range(int(input()))]
print(sum(n))

Submission status: Accepted

Solution code:
N = int(input())
print(round(N*(N+1)/2))

Submission status: Accepted

Solution code:
def main():
  N = int(input())
  sum = 0
  for i in range(1,N+1):
    sum = sum + i
  print(sum)

main()

Submission status: Accepted

Solution code:
# coding: utf-8
n = int(input())
print((n + 1) * n // 2)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0

for i in range(1,N+1):
  ans +=i
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = 0

for i in range(1, n+1):
        a = a + i

print(a)

Submission status: Accepted

Solution code:
n = int(input())
k = 0
for i in range(n+1):
  k += i
print(k)

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
for i in range(N+1):
	sum += i

print(sum)

Submission status: Accepted

Solution code:
N = int(input())
ans = N*(N+1)//2
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
ans=int(n*(n+1)/2)
print(ans)

Submission status: Accepted

Solution code:
N = int(input().rstrip())

v = (1 + N) * int(N / 2)
if N % 2 == 1:
    v += int(N / 2) + 1

print(v)

Submission status: Accepted

Solution code:
a =int(input())
b=0
for i in range(1,a+1):
  b=b+i
print(b)

Submission status: Accepted

Solution code:
A=int(input())
N=0
for i in range(1,A+1):
  N+=i
print(N)

Submission status: Accepted

Solution code:
N = int(input())
print((N+1)*N // 2)

Submission status: Accepted

Solution code:
from sys import stdin
a = int(stdin.readline().rstrip())
print(sum([i for i in range(1, a+1)]))

Submission status: Accepted

Solution code:
n = int(input())
a = [i for i in range(n+1)]

print(sum(a))

Submission status: Accepted

Solution code:
N = int(input())
result = N * (1 + N) // 2
print(result)

Submission status: Accepted

Solution code:
ans = 0
for i in range(1,int(input())+1):
    ans += i
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

if N%2==0:
  print(int((N+1)*N/2))
else:
  print(int((N+1)*(N//2)+(N-N//2)))

Submission status: Accepted

Solution code:
n = int(input())

sum = 0
for i in range(1,n+1):
    sum += i

print (sum)

Submission status: Accepted

Solution code:
# coding: utf-8
n = int(input())
print(n * (n + 1) // 2)

Submission status: Accepted

Solution code:
N = int(input())
sum = int(N*(N+1)/2)
print(sum)

Submission status: Accepted

Solution code:
a=int(input())
sum=0
for i in range(a+1):
 sum=sum+i

print(sum)

Submission status: Accepted

Solution code:
Sum=0
N=int(input())
for i in range(N):
  Sum+=i+1
print(Sum)

Submission status: Accepted

Solution code:
N = int(input())
count = 0
for i in range(1,N+1):
  count += i

print(count)

Submission status: Accepted

Solution code:
# ABC 043 A - キャンディーとN人の子供イージー / Children and Candies (ABC Edit)
N = int(input())
ans = 0
for i in range(N+1):
    ans +=i
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for i in range(n+1):
    ans+=i
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
total=0
for i in range(N):
  total += i+1
print(total)

Submission status: Accepted

Solution code:
a = input()
b = 0
for x in range(int(a)+1):
    b+=x
print(b)

Submission status: Accepted

Solution code:
N = int(input())

def dfs(n):
  ret = 0
  for i in range(1,n+1):
    ret += i
  return ret
print(dfs(N))

Submission status: Accepted

Solution code:
a = int(input())
sum = 0
for i in range(a):
  sum += i+1
print(sum)

Submission status: Accepted

Solution code:
a=int(input())
sum=0
while a>0:
  sum=sum+a
  a=a-1

print(sum)

Submission status: Accepted

Solution code:
n = int(input())
print( (n * (n+1)) // 2)

Submission status: Accepted

Solution code:
N=int(input())
sum=0
for i in range(N+1):
    sum=sum+i
print(sum)

Submission status: Accepted

Solution code:
n = int(input())
result = 0
for i in range(1,n+1):
    result += i

print(result)

Submission status: Accepted

Solution code:
N=input()
print N*(N+1)/2

Submission status: Accepted

Solution code:
s=int(input())
print(int(s*(s+1)/2))

Submission status: Accepted

Solution code:
N = int(input())

from operator import add
from functools import reduce
ans = reduce(add, range(N)) + N

print(ans)
print()

Submission status: Accepted

Solution code:
num = int(input())
print(int(num*(num+1)/2))

Submission status: Accepted

Solution code:
n=int(input())
s=0
for i in range(n):
    s+=i+1
print(s)

Submission status: Accepted

Solution code:
N = int(input())

def solve(n):
	return n * (n + 1) // 2
  
print(solve(N))

Submission status: Accepted

Solution code:
a=int(input())
kei=0
for i in range(a):
  kei+=i+1
print(kei)

Submission status: Accepted

Solution code:
N = int(input())
total = 0
for i in range(1, N+1):
    total += i
print(total)

Submission status: Accepted

Solution code:
s = int(input())
num = (s + 1) * s / 2
ans = int(num)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
for i in range(N):
    sum += i+1
print(sum)

Submission status: Accepted

Solution code:
num = int(input())
sum = (num + 1) * num / 2
print(int(sum))

Submission status: Accepted

Solution code:
n = int(input())
kaijo = list(range(1, n+1))
print(sum(kaijo))

Submission status: Accepted

Solution code:
n = int(input())
m=0
for i in range(n):
    i+=1
    m+=i
print(m)

Submission status: Accepted

Solution code:
""" AtCoder """

N = int(input())

ans = 0
for i in range(1, N + 1):
    ans += i

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
k=0
for s in range(1,N+1):
    k+=s
print(k)

Submission status: Accepted

Solution code:
N = int(input())
print(N * (1 + N) // 2)

Submission status: Accepted

Solution code:
N = int(input())
lists = [i for i in range(1, N + 1)]
print(sum(lists))

Submission status: Accepted

Solution code:
a=int(input())
print(sum(range(a))+a)

Submission status: Accepted

Solution code:
a  = int(input())
t = 0
for i in range(a):
    t += i+1
print(t)

Submission status: Accepted

Solution code:
N=int(input())
x=0
for i in range(N):
  x+=(i+1)
print(x)

Submission status: Accepted

Solution code:
N = int(input())
counter = 0
for i in range(1, N+1):
  counter += i
print(counter)

Submission status: Accepted

Solution code:
n = int(input())
print(int(n * (n+1) / 2))

Submission status: Accepted

Solution code:
n = int(input())
result = (1 + n) * n // 2
print(result)

Submission status: Accepted

Solution code:
n = int(input())
def f(n):
    if n == 1:
        return 1
    return n + f(n - 1)
print(f(n))

Submission status: Accepted

Solution code:
n=int(input())
ans=sum(i for i in range(1,n+1))
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

ans = sum(i for i in range(n + 1))

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
print((1+n)*n//2)

Submission status: Accepted

Solution code:
n = int(input())
total = 0
for i in range(n):
    total += i+1
print(total)

Submission status: Accepted

Solution code:
Num = int(input())

print(sum(range(Num + 1)))

Submission status: Accepted

Solution code:
Num = int(input())

print(sum([i for i in range(Num + 1)]))

Submission status: Accepted

Solution code:
a = 0
for i in range(int(input())):
  a += i + 1
print(a)

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
for i in range(n):
  sum += i + 1
print(sum)

Submission status: Accepted

Solution code:
answer = 0
for a in range(int(input())):
    answer += a+1

print(answer)

Submission status: Accepted

Solution code:
n = int(input())
a = list(range(1,n +1))
print(sum(a))

Submission status: Accepted

Solution code:
print(sum(list(range(0, int(input())+1))))

Submission status: Accepted

Solution code:

while True:
    try:
        n = int(input())
        sum = int(0)
        for i in range(1, n+1):
            sum += i
        print(sum)
    except:
        break;

Submission status: Accepted

Solution code:
n=int(input())
ans=0
kari=0
for i in range(n):
    kari+=1
    ans+=kari
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
l = range(1, a+1)
b = sum(l)
print(b)

Submission status: Accepted

Solution code:
# A
N = int(input())
print(N*(N+1)//2)

Submission status: Accepted

Solution code:
def execute(n):
    return n * (1 + n) // 2


if __name__ == '__main__':
    print(execute(int(input())))

Submission status: Accepted

Solution code:
n=input()
n=int(n)
print(n*(1+n)//2)

Submission status: Accepted

Solution code:
a = int(input())
b = 0
for i in range(1,a+1):
    b +=i
print(b)

Submission status: Accepted

Solution code:
n = int(input())
print(int((1 + n) * n / 2))

Submission status: Accepted

Solution code:
N = int(input())
ans = int(N * (N + 1) / 2)
print(ans)

Submission status: Accepted

Solution code:
a = int(input())

ans = 0
while(a>0):
    ans+=a
    a-=1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

print(sum([i for i in range(n + 1)]))

Submission status: Accepted

Solution code:

def sum(x):
  if x == 1:
    return 1
  else:
    return sum(x-1)+x

print(sum(int(input())))

Submission status: Accepted

Solution code:
n=int(input())
a=[i for i in range(n+1)]
print(sum(a))

Submission status: Accepted

Solution code:
n = int(input())
print(int((1+n)*n/2))

Submission status: Accepted

Solution code:
j = 0
for i in range(int(input())+1):
    j += i
print(j)

Submission status: Accepted

Solution code:
N = int(input())
print((1 + N) * N // 2)

Submission status: Accepted

Solution code:
N = int(input())

print(int((1+N)*N/2))

Submission status: Accepted

Solution code:
a = int(input())
o = 0
for x in range(1, a+1):
    o += x
    
print(o)

Submission status: Accepted

Solution code:
# 

n=int(input())
a=0
for i in range(n):
    a+=i+1
print(a)

Submission status: Accepted

Solution code:
n = int(input())
print((n>=2)*(int((1+n)/2*n))or(n==1)*(1))

Submission status: Accepted

Solution code:
N = int(input())
print(int((N * (N+1))/2))

Submission status: Accepted

Solution code:
n=int(input())
print(int (n*(n+1)/2))

Submission status: Accepted

Solution code:
N = int(input())

cnt = 0
for i in range(1,N+1):
  cnt += i
print(cnt)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print(n * (n + 1) // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
cnt = 0
for i in range(a+1):
    cnt += i
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
num = 0
for n in range(N):
    num += n+1
print(num)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n = int(input())
    print((n + 1)*n//2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

#x = input().split()
#y = input().split()


x = int(input())

#for i in range(len(x)):
#   a.append(int(x[i]))
num =0
for i in range(x):
    num+=(i+1)
print(num)

Submission status: Accepted

Solution code:
n = int(input())
print(int((1 + n) * n /2 ))

Submission status: Accepted

Solution code:
n = int(input())
if n == 1:
    print(1)
else:
    print(int((1 + n)*(n/2)))

Submission status: Accepted

Solution code:
N=int(input())
i=1
s=0
while i<=N:
    s+=i
    i+=1
print(s)

Submission status: Accepted

Solution code:
N = int( input())
print( N*(N+1)//2)

Submission status: Accepted

Solution code:
print(sum(i for i in range(int(input())+1)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
print(N * (N+1) // 2 )

Submission status: Accepted

Solution code:
n = int(input())
print(n * (n + 1) // 2)

Submission status: Accepted

Solution code:
N=int(input())
print((N+1)*N//2)

Submission status: Accepted

Solution code:
n=int(input())
print((1+n)*(n//2)+[0,(1+n)//2][n%2])

Submission status: Accepted

Solution code:
print(sum([i for i in range(1, int(input())+1)]))

Submission status: Accepted

Solution code:
# input
N = int(input())

ans = 0

for i in range(N):
    ans += i + 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = 0
for i in range(N+1):
    a+=i
print(a)

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
    s = 0
    for i in range(n):
        s+=(i+1)
    return s

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
b = input("")
count = 0
for i in range(1,int(b)+1):
    count+=i
print(count)

Submission status: Accepted

Solution code:
n=int(input())
x=0
for i in range(n):
  x+=i+1
print(x)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys

def solve(n):
    s = 0
    for i in range(1,n+1):
        s += i
    print(s)

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    n = int(ws[0])
    return (n,)

def main():
    solve(*readQuestion())

# Uncomment before submission
main()

Submission status: Accepted

Solution code:
a=int(input())



c=0



for i in range(a):
    c+=i+1

    
print(c)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1, n+1):
	ans += i
	
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

print(int(N * (N+1) / 2))

Submission status: Accepted

Solution code:
N = input()
print sum([i + 1 for i in range(N)])

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


def main():
    print(sigma(int(input())))


main()

Submission status: Accepted

Solution code:
N = int(input())
cnt = N *(1+N)//2
print(cnt)

Submission status: Accepted

Solution code:
ans = 0
for i in range(int(input())):
    ans += i+1

print(ans)

Submission status: Accepted

Solution code:
num = int(input())
mlp = int(num / 2)
bf_ans = (1 + num) * mlp
if num % 2 == 0:
    ans = bf_ans
else :
    ans = bf_ans + (mlp + 1)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = 0
for i in range(1, n + 1):
    a += i
print(a)

Submission status: Accepted

Solution code:
N=int(input())
a=0

for i in range(N+1):
   a+=i

print(a)

Submission status: Accepted

Solution code:
N = int(input())
a = 1
print(int(((a + N) / 2) * N))

Submission status: Accepted

Solution code:
N = int(input())

print(((1 + N)* N) // 2)

Submission status: Accepted

Solution code:
def calcTriangle(x):
  return x*(x+1)//2
print(calcTriangle(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1, n + 1):
    ans += i
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = 0
for i in range(N+1):
  S += i
print(S)

Submission status: Accepted

Solution code:
a = int(input())
print(int((a + 1)*a / 2))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n=int(input())
print(int(n*(n+1)/2))

Submission status: Accepted

Solution code:
n = int(input())
candy = 0
for i in range(1,n+1):
    candy += i
print(candy)

Submission status: Accepted

Solution code:
N = int(input())
print(int(N * (N+1) / 2))

Submission status: Accepted

Solution code:
#1
n=int(input())
sum=0
for i in range(n):
    sum=sum+i+1
print(sum)

Submission status: Accepted

Solution code:
n=input();print(n*-~n/2)

Submission status: Accepted

Solution code:
N = int(input())
print(int(N * (N+1) / 2))

Submission status: Accepted

Solution code:
a=int(input())
def f(x):
    return(x*(x+1)//2)
print(f(a))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    print(sum(range(1, N + 1)))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = input()
sum = N * (N + 1) / 2 
print(sum)

Submission status: Accepted

Solution code:
n=int(input());print(int(n*(1+n)/2))

Submission status: Accepted

Solution code:
N = int(input())

print((N * (N + 1) // 2))

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1,n+1):
  ans += i
print(ans)

Submission status: Accepted

Solution code:
res = 0
n = int(input())
for i in range(1,n+1):
    res += i
print(res)

Submission status: Accepted

Solution code:
N = int(input())
ans = int(((1+N)*N)/2)
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
count = 0
for i in range(1,a+1):
  count += i
print(count)

Submission status: Accepted

Solution code:
child_num = int(input())
candy_num = 0
for num in range(child_num):
    candy_num += num + 1
print(candy_num)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    print(int(N * (N + 1) / 2))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
ret = 0
for i in range(N):
    ret += i+1
print(ret)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

n = int(stdin.readline().rstrip())
ans = 0

for i in range(n):
    ans += i+1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
  print(n*(1+n)//2)
else:
  print((n*(1+(n-1))//2)+(n//2+1))

Submission status: Accepted

Solution code:
num = int(input())
count = 0
for i in range(0, num):
    count += i+1

print(count)

Submission status: Accepted

Solution code:
r = 0
for i in range(int(input()) + 1):
  r += i
print(r)

Submission status: Accepted

Solution code:
#! /usr/bin/python3
# A - キャンディーとN人の子供イージー / Children and Candies (ABC Edit)

"""
問題文
    競プロ幼稚園にはN人の子供がいます。
    えび先生は、子供たちを一列に並べ、
    一人目にはキャンディーを1個,二人目には2個,...,
    N人目にはN個あげることにしました。
    必要なキャンディーの個数の合計は何個でしょう?
制約
    1 ≦ N ≦ 100
入力
    入力は以下の形式で標準入力から与えられる。
    N
出力
    必要なキャンディーの個数の合計を出力せよ。
"""

test_mode = True

N = int(input())    # 人数
candy = 0           # キャンディーの個数

for i in range(N):  # 一人ずつキャンディーの個数を加える
    candy += i+1

print(candy)

Submission status: Accepted

Solution code:
n = int(input())
candy=0
index=0
while index < n:
    index+=1
    candy+=index
print(candy)

Submission status: Accepted

Solution code:
a=int(input())
l=[]
for i in range(a):
    l.append(i+1)
print(sum(l))

Submission status: Accepted

Solution code:
a=int(input())
print(int(a*(a+1)/2))

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    N = int(input())
    print((1 + N) * N // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
r = 0
for i in range(1, int(input()) + 1):
  r += i
print(r)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
for i in range(1, N+1):
    ans += i

print(ans)

Submission status: Accepted

Solution code:
#coding: utf-8
print(sum([i for i in range(int(input())+1)]))

Submission status: Accepted

Solution code:
#coding: utf-8
N = int(input())
print(N * (N+1) // 2)

Submission status: Accepted

Solution code:
n = input()

#print(n)

ans = 0

for i in range(int(n)):
    #print(i)
    ans += i + 1

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
while n > 0:
  ans += n
  n -= 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
for i in range(n):
    sum += i+1
print(sum)

Submission status: Accepted

Solution code:
n=int(input());print(int(n*(1+n)/2))

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

n = int(input())
print(sum([i for i in range(n + 1)]))

Submission status: Accepted

Solution code:
ans = 0
for i in range(1, int(input()) + 1):
    ans += i
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
a=0
b=0
while not a==N:
    a+=1
    b+=a
print(b)

Submission status: Accepted

Solution code:
N  = int(input())
ans = 0
for i in range(N+1):
    ans += i
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
cnt = 0
for i in range(1, N + 1):
  cnt += i
print(cnt)

Submission status: Accepted

Solution code:
a = int(input())
ans = 0
for i in range(a + 1):
    ans = ans + i
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
print (n*(n+1)//2)

Submission status: Accepted

Solution code:
def total_candy(n):
    if n == 1:
        return 1
    else:
        return n + total_candy(n-1)

if __name__ == '__main__':
    n = int(input())
    print (total_candy(n))

Submission status: Accepted

Solution code:
a=int(input());print(a*(a+1)//2)

Submission status: Accepted

Solution code:
n=int(input())
total=0
for i in range(1,n+1):
    total +=i
print(total)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    candys = N * (1 + N) // 2
    print(candys)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
for i in range(1,n+1):
    ans += i

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
sumof = 0

for i in range(1, N+1):
    sumof += i
print(sumof)

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-

def main():
    n = int(input())
    ans = (n * (1 + n)) // 2
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#43a
n = int(input())
ans = int(n*(1+n)/2)
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
print((int)((n+1)*n/2))

Submission status: Accepted

Solution code:
from math import*
n=int(input())
print(floor(n*(n+1)/2))

Submission status: Accepted

Solution code:
from math import *
n=int(raw_input())
print n * (n + 1) / 2

Submission status: Accepted

Solution code:
n=int(raw_input())
print n * (n + 1) / 2

Submission status: Accepted

Solution code:
n = int(input())
candy = 0
for i in range(n+1):
    candy += i
print(candy)

Submission status: Accepted

Solution code:
print sum(range(1, int(raw_input()) + 1))

Submission status: Accepted

Solution code:

def main():
    n = int(input())

    ans = 0
    for i in range(1,n+1):
        ans+=i

    print(ans)

if __name__ == "__main__":
        main()

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
for i in range(1,n+1):
    ans +=i

print(ans)

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8 :
n = int(raw_input())
ko = 0
for i in range(n+1):
    ko += i

print(ko)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1,n+1):
   ans += i
print(ans)

Submission status: Accepted

Solution code:
import sys

n= int(input())
print(int(n*(n+1)/2))
sys.exit(0)

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for i in range(1, N + 1):
    ans += i
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for i in range(n):
    ans += i+1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
for i in range(n+1) :
    sum += i
print(sum)

Submission status: Accepted

Solution code:
N=int(input())
print(int(N * (N+1) /2))

Submission status: Accepted

Solution code:
import math
N = int(input())
print(N*(N+1)//2)

Submission status: Accepted

Solution code:
n = int(input())

print(int(n/2 * (n+1)))

Submission status: Accepted

Solution code:
n = int(input())
n = int(0.5*n*(n+1))
print(n)

Submission status: Accepted

Solution code:
n = 0
for i in range(int(input())+1):
    n += i
print(n)

Submission status: Accepted

Solution code:
n=int(input())
print((n+1)*(n//2) + ((n+1)//2)*(n%2))

Submission status: Accepted

Solution code:
#coding:utf-8
n=int(input())
count=0
for i in range(n+1):
  count+=i
print(count)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
for i in range(N+1):
	ans += i

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

Ans = 0
for i in range(1,N + 1,1):
    Ans += i
print(Ans)

Submission status: Accepted

Solution code:
N = int(input())

total = 0
for i in range(1,N+1):
    total += i

print(total)

Submission status: Accepted

Solution code:
n=int(input())
s=0
for i in range(1,n+1):
    s+=i
print(s)

Submission status: Accepted

Solution code:
n = int(raw_input())
print(n*(n+1)/2)

Submission status: Accepted

Solution code:
N = int(input())
print(int(N * (N + 1)/ 2))

Submission status: Accepted

Solution code:
n = int(input())

ans = sum([i for i in range(1, n + 1)])
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

total = 0
for i in range(1, N + 1):
    total += i

print(total)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
print(n*(n+1)//2)

Submission status: Accepted

Solution code:
s = int(input())
if s == 1:
  print(1)
else:
  print(int((1+s)*s/2))

Submission status: Accepted

Solution code:
N = int(input())

print (N*(N+1)//2)

Submission status: Accepted

Solution code:
a=int(input())
c=0
for i in range(a):
    c+=i+1
print(c)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input())

# 等差数列の公式を使えばfor文より速い
print((N ** 2 + N) // 2)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input())

ans = 0
for i in range(1, N+1):
    ans += i
print(ans)

Submission status: Accepted

Solution code:
n = 0
for i in range(1,int(input())+1):
  n = n + i
else:
  print(n)

Submission status: Accepted

Solution code:
n=int(input())
a=0
for i in range(n+1):
    a=a+i
print(a)

Submission status: Accepted

Solution code:
N=int(raw_input())
print N*(N+1)/2

Submission status: Accepted

Solution code:
s=0
x=int(input())
for i in range(x+1):
  s += i
print(s)

Submission status: Accepted

Solution code:
result=0
for i in range(1,int(input())+1):
    result+=i
print(result)

Submission status: Accepted

Solution code:
print(sum([int(i) for i in range(int(input())+1)]))

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for i in range(1, n+1):
  ans+=i
print(ans)

Submission status: Accepted

Solution code:
print('{}'.format(sum(range(1+int(input())))))

Submission status: Accepted

Solution code:
a=input()
b=int(a)
c=(b+1)*b//2
print(c)

Submission status: Accepted

Solution code:
n = int(input())
res = 0
for i in range(1, n+1):
    res += i
print(res)

Submission status: Accepted

Solution code:
N = int(input())
count = 0 
for i in range(1,N + 1):
    count += i
print(count)

Submission status: Accepted

Solution code:
n = int(input())
print("{}".format(int(n*(n+1)/2)))

Submission status: Accepted

Solution code:
a = int(input())
sum = 0
for i in range(a+1):
	sum = sum + i
   
print(sum)