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: Wrong Answer

Solution code:
N = 3

camdy_for_pair =  (1 + N)
num_of_pairs, amari = divmod((N),2)

if amari == 0:
    nesseary_candy = num_of_pairs * camdy_for_pair
else :
    nesseary_candy = num_of_pairs * camdy_for_pair + num_of_pairs + 1
    
print(nesseary_candy)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(Answer)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(Answer)

Submission status: Wrong Answer

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

for i in range(N):
	t += i
  
print(t)

Submission status: Wrong Answer

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

for i in range(N):
	t += i
  
print(i)

Submission status: Wrong Answer

Solution code:
##### 解けた #####

N=int(input())

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

Submission status: Wrong Answer

Solution code:
#ABC043_A

N = int(input())

sum = 0

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

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
print(math.factorial(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())

print(math.factorial(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())

list = np.array(range(n))

print(sum(list))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = int(input())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(n):
  sum+=(n+1)**2
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import Counter
import re
import sys

s=input()
checked=[]
for i in range(len(s)):
    suffix=s[i:]
    f_len=len(suffix)
    for j in range(f_len):
        if(j==0):
            fact=suffix
        elif(j>0):
            fact=fact[:-1]
        if(fact in checked):
            continue
        count=Counter(fact)
        count_max=max(count.values())
        moji=[moji for moji,j in count.items() if j==count_max]
        moji=moji[0]
        if(count[moji]>len(fact)/2 and len(fact)>1):
            span=(re.search(fact,s).span())
            print(span[0]+1,span[1])
            sys.exit()
        checked.append(fact)
print(-1,-1)

Submission status: Wrong Answer

Solution code:
s =str(input())

a=''

for x in s:
  if x=='0':
    a+='0'
  elif x=='1':
    a+='1'
  else:
    a=a[:-1]
    
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
ans=''
n=0
for i in s:
  if i == '0'or i == '1':
    ans+=i
    n+=1
  else:
    ans=ans[:n-1]
    n-=1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
asum = 1

for x in range(2,100):
    asum += x

print(asum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def f(N):
    return N/2(N+1)

def sigma(func,frm,to):
    result = 0;
    for i in range(frm,to+1):
        result += func(i)
        
    print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
r = []
for i in s:
  if i == "B":
    if r:
      del r[-1]
  else:
    r.append(i)
print(*r, sep="")

Submission status: Wrong Answer

Solution code:
bun = input()
res = ''
for moji in bun:
    if moji != 'B':
        res = res + moji
    else:
        res = res[0:-1]
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding:utf-8

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

print(candy)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#幼稚園の子供の数N
N = input()

"""
3人の場合、1 * 2 * 3 個必要
ということは、N!個？
"""

from math import factorial

print(factorial(int(N)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
S = input()
ans = ""
for i in S:
    if i == "B":
        ans = ans[0:-1]
    else:
        ans += i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC043A
N = int(input())
q, mod = divmod(N, 2)

if(q==1):
    print("1")
else:
    if (mod > 0): q += 1
    print((N+1)*q)

Submission status: Wrong Answer

Solution code:
n = int(input())
q, mod = divmod(n, 2)
if mod == 0:
  print((1 + n) * q)
else:
  print((1 + n) * q + q)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input('Input N > '))

list_N = [ x for x in range(1, N+1) ]
print( sum(list_N) )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(len(S)-2):
    s = S[i:i+3]
    if s[0] == s[1] or s[0] == s[2] or s[1] == s[2]:
        print(i,i+2);exit()
print("-1 -1")

Submission status: Wrong Answer

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


def solve(N: int):
    return


# Generated by 1.1.4 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: Wrong Answer

Solution code:
lines = list(input())
answers = []
out = ""
for line in lines:
    if line == "0" or line == "1":
        answers.append(line)
    elif answers:
        answers.pop()
for answer in answers:
    out += answer
print(out)

Submission status: Wrong Answer

Solution code:
n=int(input())

ans=n*(n+1)/2

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def gokei(x):
  if x<=0:
    return 0
  p = x + gokei(x-1)
  return p

n = int(input())
gokei(n)

Submission status: Wrong Answer

Solution code:
from math import factorial

print(factorial(int(input())))

Submission status: Wrong Answer

Solution code:
import math

print(math.factorial(int(input())))

Submission status: Wrong Answer

Solution code:
n=int(input())

m=n-(n-1)
print((n/2)*(n+m))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
print(math.factorial(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

def recurse_n(now):
  return 1 if now == 1 else now * recurse_n(now - 1)
print(recurse_n(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

s_set = set( s )
target_ch = ''
for s_each in s_set :
	count = s.count( s_each )
	if count >= len(s)/2:
		target_ch = s_each
		break

if target_ch == '':
	print( "-1 -1" )
else:
	print( str( s.find( target_ch )+1 ) \
		+ " " \
		+ str( s.rfind( target_ch )+1 ) )

Submission status: Wrong Answer

Solution code:
n = int( input() )

sum = ( n + 1 ) * n * 0.5
print( sum )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = ""
for c in s:
  if c == "0" or c == "1":
    ans += c
  elif c == "B" and ans != "":
    ans = ans[:len(ans) - 1]

print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
print(sum([int(x) for x in input().split()]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())
s_len = len(s)
a = ['a', 'b', 'c', 'd', 'e','f','g','h','i','j','k','l','m','n',
     'o','p','q','r','s','t','u','v','w','x','y','z']
I = -2
J = 0
for letter in a:
  for i in range(0, len(s)-1):
    for j in range(2, len(s)-i):
      #print('{}{}{}'.format(letter, i, j))
      if s[i:i+j].count(letter) > j/2:
        I = i
        J = j
        #print('{}{}'.format(i, j))
        break
print(I + 1, I + J + 1)

Submission status: Wrong Answer

Solution code:
N = int(input())

C = 0

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

print(C)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a = II()
    ans = 0
    for i in range(a + 1):
        ans += a
    print(ans)
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
X=""
for i in range (1,(len(N)-1)):
    if(N[i] is not "B")and(N[i-1] is not "B"):
        X=X+N[i-1]
if(N[len(N)-1] is not "B"):
    X=X+N[len(N)-1]
print(X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
b=""

for i in a:
    if i=="0":
        b+="0"
    if i=="1":
        b+="1"
    if i=="B":
        b=b[:-1]

print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(n):
  sum+=i;

print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

sum=n*(n+1)/2

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())

sum=N*(N+1)/2

print(sum)

Submission status: Wrong Answer

Solution code:
N=int(input())

i=0

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

Submission status: Wrong Answer

Solution code:
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import sys

sys.setrecursionlimit(10000)
INF = float('inf')


print(math.factorial(int(input())))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = 0

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

print(a)

Submission status: Wrong Answer

Solution code:
s = input()
ans =[]
for i in range(len(s)):
    if s[i] == '0':
        ans.append('0')
    elif s[i] == '1':
        ans.append('1')
    elif len(ans) != 0:
        ans.pop(-1)
print(''.join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n= int(input())
print(math.factorial(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
c = list(input())
ans = []
for i in range(len(c)):
    if c[i] == '0':
        ans.append('0')
    elif c[i] == '1':
        ans.append('1')
    elif len(ans) != 0:
        del ans[-1]
    else:
        continue

print (''.join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
answer =[]

for letter in input():
  if letter=="1":
    answer.append("1")    
  elif letter=="0":
    answer.append("0")    
  elif letter=="B" and len(answer)>0:
    answer.pop()
    
print("".join(answer))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
# s = "01B0"
# print(s[0])

ans = []
for key in range(len(s)):

    if s[key] == "0" or s[key] == "1":
        ans.append(s[key])
    if s[key] == "B":
        ans.pop(-1)
print("".join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())

ans = (1+a)*a/2

print(a)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def main():
  a = int(input())
  print(((a+1)*a)/2)

if __name__=='__main__':main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def main():
  a = int(input())
  if a%2==0:
    print((a+1)*a/2)
  else:
    print((a+1)*a/2+(a+1)/2)

if __name__=='__main__':main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N  = int(input())

print((1+N)//2)

Submission status: Wrong Answer

Solution code:
s = input()
s_list = list(s)
count = s.count('B')
for _ in range(count):
  ind = s_list.index('B')
  if ind > 0:
    s_list[ind-1] = ''
  s_list[ind] = ''
s = ''.join(s_list)
print(s)

Submission status: Wrong Answer

Solution code:
s = input()
s_list = list(s)
count = s.count('B')
for _ in range(count):
  ind = s_list.index('B')
  s_list[ind-1] = ''
s = ''.join(s_list)
s = s.replace('B','')
print(s)

Submission status: Wrong Answer

Solution code:
String = input()
result = ''
for char in String:
    if char == '0' or char == '1':
        result += char
    elif char == 'B':
        result = result[:-1]
print(result)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
def solves(N):
	cnt = 0
	for i in xrange(N): cnt += i
	return cnt

Submission status: Wrong Answer

Solution code:
def solves(N):
	return N*(N-1) / 2

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
dic = {}
flag = False

for key in s:
  if key not in dic:
    dic[key] = 0
  dic[key] += 1
#print(dic)

chk = 0
for k, v in dic.items():
  if len(s) % 2 == 0:
    if v == len(s)/2:
      chk += 1
      continue
    if chk >= 2:
      break
    elif chk == 1:
      for k, v in dic.items():
        if v >= len(s)/2:
          start = s.find(k)+1
          end = s.rfind(k)+1
          print(start, end)
          flag = True
          break
    if v > len(s)/2:
      start = s.find(k)+1
      end = s.rfind(k)+1
      print(start, end)
      flag = True
      break
  elif len(s) % 2 == 1:
    if v >= len(s)/2:
      start = s.find(k)+1
      end = s.rfind(k)+1
      print(start, end)
      flag = True
      break

if flag == False:
  print(-1, -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

checker = ''

if len(s) == 2:
    if s[0] == s[1]:
        print(1, 2)
        checker += '*'
    else:
        print(-1, -1)
        checker += '*'


if checker == '':
    for a, b in zip(range(len(s)-1), range(1,len(s))):
        if s[a] == s[b]:
            print(a+1, b+1)
            checker += '*'
            break

if checker == '':
    for a, c in zip(list(range(len(s)-2)), list(range(2, len(s)))):
        if s[a] == s[c]:
            print(a+1, c+1)
            chekcher += '*'
            break

if checker == '':
    print(-1, -1)

Submission status: Wrong Answer

Solution code:
a = ""
for i in input():
  if(i == "B"):
    if(a != ""):
	    a = a[:len(a)-1]
  else:
    a += i
print(a)

Submission status: Wrong Answer

Solution code:
l_s = [a for a in input()]
l_str = ''
for a in l_s:
    if a == '0':
        l_str += ('0')
    elif a == '1':
        l_str += ('1')
    elif a == 'B':
        l_str = l_str[:-1]

print(l_str)

Submission status: Wrong Answer

Solution code:
a = str(input())

b = list(a)

c = len(b)

strs = []

for i in range(c):
  if b[i] == 'B':
      strs = strs[:-1]
  else:
    strs.append(b[i])

ans = str(''.join(strs))
print(ans)

Submission status: Wrong Answer

Solution code:
a = str(input())

b = list(a)

c = len(b)

strs = []

for i in range(c):
  if b[i] == 'B':
      strs = strs[:-1]
  else:
    strs.append(b[i])

print(''.join(strs))

Submission status: Wrong Answer

Solution code:
a = str(input())

b = list(a)

c = len(b)

strs = []

for i in range(c):
  if b[i] == 'B':
    if i == 0 or len(strs) == 0 or b[i-1] == 'B':
      continue
    else:
      strs = strs[:-1]
  else:
    strs.append(b[i])

print(''.join(strs))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
print(s)
l=[]
for i in s:
    if i=="1":
        l.append(i)
    elif i=="0":
        l.append(i)
    elif i=="B":
        if len(l)!=0:
            l.pop()
print("".join(l))

Submission status: Wrong Answer

Solution code:
s=list(map(str,input().split()))
l=[]
for i in s:
    if i=="1":
        l=s.pop(0)
    elif i=="0":
        l=s.pop(0)
    elif i=="B":
        l.pop()
print("".join(l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def candy_number():
      children=input("N")
      num=int(children)*(int(children)+1)/2
      print("N")
      print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

print((1 + n) / 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N = int(input())

print(math.factorial(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print((int(input())+0.5)**2//2)

Submission status: Wrong Answer

Solution code:
def func(s):
    for i in range(len(s)-1):
        if s[i]==s[i+1]:
            return i+1, i+2
    for i in range(len(s)-2):
        if s[i]==s[i+2]:
            return i+1, i+3
    return -1,-1

s = input()
a,b = func(s)
print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print("3")

Submission status: Wrong Answer

Solution code:
s = input().split()
print((int(s[0])*int(s[0])+int(s[0]))/2)

Submission status: Wrong Answer

Solution code:
s = input().split()
print((int(s[0])*int(s[0])-int(s[0]))/2)

Submission status: Wrong Answer

Solution code:
s = input().split()
print(int(s[0])*int(s[0])-int(s[0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print((lambda x:x* ~-x/2)(int(input())))