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 candy():
  n=int(input())
  a=0
  for i in range (1,n+1):
    a=a+i

  print(a)
    

candy()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N = read_int()
    return N*(N+1)//2


if __name__ == '__main__':
    print(solve())

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(1, n+1):
    total += i

print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

print(int(N*(N+1)*0.5))

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(sum(list(range(1, N + 1))))

Submission status: Accepted

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

candy()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	n = I()
	print(n*(n+1)//2)


if __name__ == '__main__':
    main()

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:
'''     ##     ##  #######  # #  ######
        ##     ##  ##   ##  ###    ##
        ##     ##  ##    #  # #    ##
        #########  #######  # #    ##    '''

import sys
import math
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())

def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end=" \ ")

MODPRIME = int(1e9+7); BABYMODPR = 998244353;

ONLINE_JUDGE = 1
if not ONLINE_JUDGE:
    sys.stdin  = open("input.txt","r")
    sys.stdout = open("output.txt","w")
    sys.stderr = open("output.txt","w")

# for _testcases_ in range(int(input())):
n = int(input())
print((n*(n+1))//2)
'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS BY ME @luctivud ( UDIT GUPTA )
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
DO NOT PLAGIARISE.
TESTCASES:
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(0.5*n*(n+1)))

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())
ans=0
for i in range(1,N+1):
  ans+=i
print(ans)

Submission status: Accepted

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

for num in range(a):
    ans=ans+(num+1)

print(ans)

Submission status: Accepted

Solution code:
import os, sys, re, math

N = int(input())

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

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())
candy = 0
for i in range(n+1):
    candy += i
print(candy)

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())
n = 0
for i in range(N+1):
    n +=i
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(candy)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def sum(num) : 
  return int((1 / 2) * num * (num + 1))


for line in sys.stdin : 
  num = int(line)
  

print(sum(num))

Submission status: Accepted

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


def solve(N: int):
    res = (1 + N) * (N / 2)
    print(int(res))


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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 = int(input())

S = N * (N+1)//2

print(S)

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

Solution code:
children_str=input()

children=int(children_str)

candies=0

while children >= 1:
  candies=candies+children
  children=children-1
  
print(candies)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if N == 1:
    print(N)
else:
    print(int((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:
a=int(input())
print(int(a*(a+1)/2))

Submission status: Accepted

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

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())
sum = (1+N)*N//2
print(sum)

Submission status: Accepted

Solution code:
n = int(input())

total = 0

for i in range(n+1):
    total = total + i

print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
N = int(N)
point = 0
while N > 0:
    point = point + N
    N = N - 1
print(point)

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(sum([i for i in range(1,n+1)]))

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(N*(N+1)//2)

Submission status: Accepted

Solution code:
#子供の人数の入力
n = int(input())
#キャンディの個数
count = 0
for i in range(0,n+1):
    count += int(i)
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem A - キャンディーとN人の子供イージー
# input
n = int(input())

# initialization
ans = (n * (n + 1)) // 2

# output
print(ans)

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    print((n*(n+1))//2)

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

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(N+1):
  ans += i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

n = int(input())

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()

    return n * (n+1) // 2;

print(main())

Submission status: Accepted

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

for i in range(a+1):
  sum += i
  
print(sum)

Submission status: Accepted

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

for n in range(N):
  a += n+1
  
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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(input())
s = 0
for i in range(N + 1):
    s += i
print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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(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())
N = []
for i in range(1, n+1):
  N.append(i)
print(sum(N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(number)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
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:
n = int(input())
candy = 0

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

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())
ans=0
for i in range(n):
  ans+=n-i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
for i in range(n):
    n=n+i
print(n)

Submission status: Accepted

Solution code:
def main():
    import sys
    
    n = int(sys.stdin.readline())
    
    print(int(n*(n+1)/2))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

n = 0

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

print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
count = 0
while x > 0:
    count += x
    x -= 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

candies = 0
for child in range(1,n+1):
    candies += child

print(candies)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())



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

Submission status: Accepted

Solution code:
n = int(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 = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

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())
Sum = 0
for i in range (N+1):
    Sum += i
    
print(Sum)

Submission status: Accepted

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

import sys
# import math
# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    print(n * (n+1) // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

m = 0.5*n*(n+1)
print(int(m))

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(1,N+1):
    s=s+i
    
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())

count = 0

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

print(count)

Submission status: Accepted

Solution code:
def cin():
	return map(int,input().split())

def cino(test=False):
    if not test:
        return int(input())
    else:
        return input()
def cina():
  return list(map(int,input().split()))

a = cino()
print((a*(a+1))//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9+7

n = int(input())
print(int((1/2)*(n)*(n+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:
N = int(input())
result = N * (N + 1) // 2
print('{}'.format(result))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
N = INT()
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:
# -*- coding: utf-8 -*-
N = int(input())
total = 0
for i in range(1, N + 1):
    total += i
print(total)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
#あえてめんどくさく。コンピューターにはめんどくさく計算してほしい。
N = int(input())

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

Submission status: Accepted

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

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 = input()
n = int(n)
total = 0
for candy in range(1, n + 1):
    total += candy

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

i = 1
ans = 0
while i<=n:
    ans += i
    i+=1

print(ans)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

Solution code:
#キャンディとＮ人の子供イージー
def ABC_43_A():
    N = int(input())

    sum=0

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

    print(sum)

if __name__ == '__main__':

    ABC_43_A()

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:
n = int(input())
a = 0
for i in range(1, n+1):
    a += i
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N= int(input())

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

print(C)

Submission status: Accepted

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

Submission status: Accepted

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

print(Count)

Submission status: Accepted

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

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:
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((1+N)*N/2))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:

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


if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

def dfs(n):#n人の必要な個数
    if n==1:
        return 1
    
    ans = n + dfs(n-1)
    return ans
print(dfs(N))

Submission status: Accepted

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

Submission status: Accepted

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

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())

count = 0

num = 1

for i in range(n):
  count += num
  num += 1

print(count)

Submission status: Accepted

Solution code:
#! python3
def main():
    N = int(input())
    ans = 0
    for i in range(N):
        ans += (i+1)
    print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

sum=0

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

print(sum)

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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


n=I()
print((n*(n+1))//2)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(SUM)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n= int(input())
con=0
soma=0
while con <= n:
	soma+=con
	con+=1

print(soma)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
number = int(input())
total = 0

for i in range(number+1):
 total += i

print(total)