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: Runtime Error

Solution code:
n = int(input().split())
for num in range(n+1):
  total = total + num
print(total)

Submission status: Runtime Error

Solution code:
n=int(input("enter candy="))
c=""
for i in range(n):
  if c==1:
    n=+1
    total=n*c
print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


def get_ints():
    return map(int, sys.stdin.readline().strip().split())


def _main():
    input()
    an = list(get_ints())

    t = 0
    old = 1000000000
    while 1:
        ans = sq(t, an)
        g = sq(t+1, an) - ans
        t -= g / abs(g)
        if old > ans:
            old = ans
        else:
            break
    print(int(old))


def sq(t, an):
    ans = 0
    for ai in an:
        ans += pow(ai - t, 2)
    return ans


if __name__ == "__main__":
    _main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
number = input()
answer = 0

for i in range(number):
  number = number+1
  answer = answer + number
  
print(answer)

Submission status: Runtime Error

Solution code:
number = input()

for i in range(number):
  number = number+1
  answer = answer + number
  
print(answer)

Submission status: Runtime Error

Solution code:
number = input()

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

print(number)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=10**18
for num in range(-100,101):
    cnt=0
    for i in range(n):
        cnt+=(num-a[i])**2
    ans=min(ans,cnt)
print(ans)

Submission status: Runtime Error

Solution code:
a = list(input())
b = []
for i in a:
    if a.count(i) >= len(a)/2:
        b = [j for j ,x in enumerate(a) if x == i]
    else:
        pass
if not b:
  print(-1,1)
else:
  print(b[0],b[1])

Submission status: Runtime Error

Solution code:
N = int(input())

ans = 0

for(i = 1; i <= N; i++):
    ans +=1

print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(x*n-max((x-y)*(n-k),0))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
list = []
for i in range(N):
  list.attend(N)
  N -= 1
print(sum(list))

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i= (a); i < (b); ++i)
typedef long long ll;
typedef pair<int,int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int main() { int N;
  cin >> N;
  cout << 0.5 * (N) * (N + 1) << endl;
}

Submission status: Runtime Error

Solution code:
a = int(input())

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

Submission status: Runtime Error

Solution code:
from functools import reduce
from operator import mul

n = int(input())
print(reduce(mul, map(range(1,n+1))))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
function Main(input) {
	const n = parseInt(input);
  	var ans = 0
  	for (var i = 1; i <= n ; i++) {
      ans += i
    }
  	console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k,x,y=[int(input()) for _ in range(4)]
print(k*x+(n-k)*y if n>k else n*x)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    n = int(input())
    lst = list(map(int, input().split()))

    ans = (50*101)*(50*101) 
    for i in range(-100,101):
        mn = 0
        for c in lst:
            mn += (i-c)*(i-c)
        ans = min(ans,mn)

    print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

print (n+1)*n/2

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
n = int(input())
arr = list(map(int,input().split()))
add = sum(arr)
x = math.ceil(add/n)
ans = 0
for i in range(len(arr)):
	ans += ((x-arr[i])*(x-arr[i]))
print(ans)

Submission status: Runtime Error

Solution code:
stay = int(input())
change_day = int(input())
first_cost = int(input())
change_cost = int(input())
total_cost = 0
 
for i in range(stay):
 if(i < change_day):
  total_cost += first_cost
 else:
  total_cost += change_cost
print(total_cost)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input(int())

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

Submission status: Runtime Error

Solution code:
a = input(int())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

x = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k,x,y = map(lnt(input().split())
              
int ans
int kouhan == n - k
              
if( n > k):
    ans == (k * x) * (kouhan*y)
else:
    ans == n * x;
              
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def main():
    t = input().split()
    dis = list(map(int, input().split()))
    like = []
    for i in range(0,10):
        if i not in dis:
            like.append(i)
    ans = []
    digit = False
    for i in range(len(t[0])):
        if digit:
            break
        ans.append(-1)
        for j, v in enumerate(like):
            if int(t[0][i]) == v:
                ans[-1] = j
                break
            elif int(t[0][i]) < v:
                ans[-1] = j
                for m in range(i + 1, len(t[0])):
                    ans.append(0)
                digit = True
                break

    ind = 0
    ans_s = []
    for i in reversed(ans):
        if i == -1:
            ind += 1
            ans_s.append(0)
        elif ind > 0:
            if i == len(like) - 1:
                ans_s.append(0)
            else:
                ans_s.append(i + ind)
                ind = 0
        else:
            ans_s.append(i)
    print(ans_s)
    if ind > 0:
        ans_s.append(-1)
    ans_s.reverse()
    if len(ans_s) == 1 and int(t[0][0]) > like[ans_s[0]]:
        ans_s.append(0)
    for i in range(0, len(ans_s)):
        ans_s[i] = str(like[ans_s[i]])
    print(''.join(ans_s))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print output

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if __name__ == '__main__':
  main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<stdio.h>

int main(void){
  double n;
  int c;
  scanf("%d", &n);
  c = (1+n)/2*n;
  print(c);
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
word = ""
for i in range(n):
	if s[i] == '0':
		word = word + "0"
	if s[i] == '1':
		word = word + "1"
	if s[i] == "B":
		word = word[:-1]

print(word)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s =str(input())

if len(s) == 2:
    if s[0]==s[1]:
        sIndex = 1
        eIndex = 2
    else:
        sIndex = -1
        eIndex = -1
elif len(s)>2:
    sIndex=-1
    eIndex=-1
    for i in range(len(s)-2):
        par_str = s[i:i+3]
        if (par_str.count(par_str[0])>=2) | (par_str.count(par_str[1])>=2):
            sIndex = i + 1
            eIndex = i + 3
            break
    
ans = str(sIndex)+' '+str(eIndex)
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
 
N =int(input())
 
a = np.array([int(i) for i in input().split()])
 
a_min = min(a)
a_max =max(a)
ans = 0
 
for i in range(a_min,a_max+1):
    diff_a = a - i
    dummy = int(sum([i**2 for i in diff_a]))
    if i == a_min:
        ans = dummy
    elif i>a_min:
        if ans > dummy:
            ans = dummy
 
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 10**9
for ai in range(min(a),max(a)+1):
    w = 0
    for aj in a:
        w += (ai-aj)**2
    ans = min(w,ans)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 10**9
for ai in range(min(a),max(a)+1):
    w = 0
    for aj in ai:
        w += (ai-aj)**2
    ans = min(w,ans)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split().strip()))
ans =10**9
for ai in range(min(a),max(a)+1):
    w = 0
    for aj in a:
        w += (ai-aj)**2
    ans = min(w,ans)
print(ans)

Submission status: Runtime Error

Solution code:

n = int(input())
a = list(map(int,input().split().strip()))
ans =10**9
for ai in range(min(a),max(a)):
    w = 0
    for aj in ai:
        w += (ai-aj)**2
    ans = min(w,ans)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split().strip()))
ans =10**9
for ai in range(min(a),max(a)):
    w = 0
    for aj in a:
        w += (ai-aj)**2
    ans = min(w,ans)
print(ans)

Submission status: Runtime Error

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

print(total)

Submission status: Runtime Error

Solution code:
N = int(input())

res = 1
for i in range(n):
  res *= (i+1)

print(res)

Submission status: Runtime Error

Solution code:
def kaijo(n):
  res = 1
  for i in range(n):
    res *= i+1
  return res

N = map(int, input().split())

print(kaijo(N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
nums = input().split()
costs = []
if nums.count(nums[0]) != len(nums):
    for i in range(-100, 101):
        sum = 0
        for num in nums:
            sum += (int(num) - i) ** 2
        costs.append(sum)
    ans = min(costs)
else:
    ans = 0
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  cout << n*(n+1)/2 << endl;
}

Submission status: Runtime Error

Solution code:
# https://atcoder.jp/contests/abc043/tasks/abc043_a
N = int(input())

print(ame(N))

def ame(N):
    sum = 0
    for i = 1 To N:
        sum += i

Submission status: Runtime Error

Solution code:
N = int(input())
print(sum(1,N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sequtils, strutils, algorithm, math, future

proc solve() =
  let n = stdin.readLine.parseInt
  var ar = lc[x | (x <- 1..n), int]
  echo sum(ar)

  
solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import statistics
n = int(input())
a = [int(i) for i in input().split()]

m = ((sum(a)/n)*2 + 1) //2
# m = statistics.mean(a)
# m = int(m) + 1 if m % 1 > 0.5 else int(m)
r = 0
for i in a:
  r += (i - m)**2
  
print(r)

Submission status: Runtime Error

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

if i in range(a):
  i += 1
  ans = ans + i
  
print(ans)

Submission status: Runtime Error

Solution code:
s=input()
a=[]
for i in s:
	if i == 'B':
      if a:
		a.pop()
	else:
		a.append(i)
print(''.join(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    # -*- coding: utf-8 -*-
    N=int(input())
    for i in range(N+1):
      i+=i
    print(s)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N=int(input())
for i in range(N+1):
  s+=i
print(s)

Submission status: Runtime Error

Solution code:
N = int(input())

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

print(S)

Submission status: Runtime Error

Solution code:
N = input()

S = N*(N+1)/2

print(S)

Submission status: Runtime Error

Solution code:
N = input()

S = N * (N+1) /2

print(S)

Submission status: Runtime Error

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass

n = i()
a = intl()
if n == 1:print(0)
else:
    s = max(a)+min(a)
    k1 = s//2
    k2 = s//2 + s%2
    k3 = s//2 -1
    c1 = 0
    c2 = 0
    c3 = 0
    for i in range(n):
        c3 += (a[i]-k3)**2
        c2 += (a[i]-k2)**2
        c1 += (a[i]-k1)**2
    print(min(c1,c2,c3))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;
using ll =long long;

#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
void coY() {cout <<"Yes"<<endl;}
void coN(){cout <<"No"<<endl;}

const ll INF = 1LL << 60;

//Write From this Line

const int mod = 1e9+7;
int main()
{
 int n ;
 cin >> n ;
 int ans = 0 ;
	ans = ( n * (n+1) / 2 );
	cout << ans << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
//  Created by conan1024hao in 2019.
//  Copyright © 2019 conan1024hao. All rights reserved.
//  専用ライブラリです、自由にコピーして構いません。
//  感谢看我的代码！Wechat:conan1024hao QQ:810396815
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define IINF 10e8
#define INF 10e16
#define MOD 1000000007
#define mod 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
//using Int=int_fast64_t;
typedef long long int ll;
typedef pair<ll,ll>Pll;
typedef pair<int,int>Pin;
long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }
long long LCM(long long a, long long b)  {return a/GCD(a,b)*b;}
int dx[8]={-1,0,1,0,1,1,-1,-1};
int dy[8]={0,-1,0,1,1,-1,1,-1};
char dir[4]={'u','l','d','r'};
ll cmp1(pair<ll,string>a,pair<ll,string> b){
        if(a.fi!=b.fi)
        return a.fi<b.fi;
        else
        return a.se<b.se;
}
//--------------------------------------------------------------------------

//---------------------------------------------------------------------------
int main(){//問題をちゃんと見ろ!!!!!!!!!!!!!!!!!      llか??????????        memset()!!!!!!!!!!!!       ペナを減らせ!!!!!!!!!!!!!
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------
    int n;cin>>n;
    cout<<n*(n+1)/2<<endl;
    //-------------------------------
    return 0;
}
//---------------------------------------------------------------------------

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
fn main() {
    let n: u32 = read();
    let mut ans = 0;
    for i in 0..n+1 {
        ans += i+1;
    }
    println!("{}", ans);
}

// 以下関数

use std::io::*;
use std::str::FromStr;
pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

pub const MOD: u64 = 1_000_000_007;

pub fn is_prime(n: i32) -> bool {
    if n < 2 {
        return false;
    } else if n == 2 {
        return true;
    }
    let mut i = 2;
    while i * i < n {
        if n % i == 0 {
            return false;
        } else {
            i += 1;
            continue;
        }
    }
    true
}

pub fn lcm(mut n: i32, mut m: i32) -> i32 {
    n = if n > m { m } else { n };
    m = if n > m { n } else { m };
    let mut i = n;
    while i % m != 0 {
        i += n;
    }
    i
}

pub fn abs(n: i32) -> i32 {
    if n >= 0 {
        n
    } else {
        -n
    }
}

pub fn max(n: i32, m: i32) -> i32 {
    if n >= m {
        n
    } else {
        m
    }
}

pub fn min(n: i32, m: i32) -> i32 {
    if n <= m {
        n
    } else {
        m
    }
}

pub fn factorial(n: u32) -> u32 {
    if n == 0 {
        return 1;
    }
    let mut r = n;
    for i in 0..n - 1 {
        r *= n - i - 1;
    }
    r
}

pub fn combination(n: u32, m: u32) -> u32 {
    factorial(n) / factorial(m) / factorial(n - m)
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys
import numpy as np
import itertools


def main(argv=sys.argv):
  
    packs = list(map(int, input().split(' ')))
    packs = sorted(packs)
    if packs[2] - packs[1] - packs[0] == 0:
        print('Yes')
    else:
        print('No')
  
    return 0


if __name__ == '__main__':
    sys.exit(main())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
temp=0
tem=0
tot=0
if len(s)>10**3:
        
    for i in range(len(s)):
        tem=1
        temp=1
        flag=0
        for j in range(i+1,len(s)):
            if s[j]==s[i]:
                temp+=1
            tem+=1
            if temp>(tem//2 ):
                print(i+1,j+1)
                
                flag=1
                tot=1
                break
        if flag:
            break
    if tot==0:
        print("-1 -1")
else:
    for i in range(len(s)-2):
        if s[i]==s[i+1]:
            print(i+1,i+2)
            flag=1
            break
        elif s[i]==s[i+2]:
            print(i+1,i+3)
            flag=1
            break
    if flag==0:
        print("-1 -1")

Submission status: Runtime Error

Solution code:
n=int(input())
l=list(map(int,input().split()))
x=10**9+7
if max(l)==min(l):
    print(0)
else:
        
    for i in range(min(l),max(l)+1):
        te=0
        
        for j in l:
            te=te+(abs(j-i))**2
        #print(i,te)
        x=min(x,te)
    print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
coding: utf-8

value = int(input())

gokei = 0

for i in range(value):
    gokei += i + 1
    
print(gokei)

Submission status: Runtime Error

Solution code:
a = input()

sol = a * (a + 1) / 2

print( sol )

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<stdio.h>
int main(void){
  int n,sum = 0;
  scanf("%d",&n);
  for(n;n >= 1;n--) sum += n;
  printf(sum);
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def a(s):
  if s == 1:
    return s
  return s + a(s-1) 

print(a(int(input()))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

print(sum(N))

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

int f(int x);

int main(){
    int n,ans;
    cin >> n;
    ans = f(n);
    cout << ans << endl; 

}

int f(int x){
    if (x==1){
        return 1;
    }
    else{
        return x+f(x-1);
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())

j=0

for i in N:
  j = j + i

else:
  print(j)

Submission status: Runtime Error

Solution code:
N = int(input())

j=0

for i in N:
  j = j + N

else:
  print(j)

Submission status: Runtime Error

Solution code:
x = 0
y = 1
n = int(input())
if y <= n:
    for y in range(1,n+1):
    x = x + y
    print(x)
    y = y + 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n =int,input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sympy as sym
(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) = sym.symbols('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')

N = int(input())
A = sym.sequence((N*(N+1))/2,(n, 1, 100))
print([type(N), N for in A])

Submission status: Runtime Error

Solution code:

import sympy as sym
(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) = sym.symbols('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')

N = int(input())
A = sym.sequence((N*(N+1))/2,(n, 1, 100))
print([int(N) for in A])

Submission status: Runtime Error

Solution code:
import sympy as sym
(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) = sym.symbols('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')

A = sym.sequence((N*(N+1))/2,(n, 1, 100))
print([int(N) for in A])

Submission status: Runtime Error

Solution code:
import sympy as sym
(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) = sym.symbols('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')

A = sym.sequence(N*(N+1)/2,(n, 1, 100))
print([int(N) for in A])

Submission status: Runtime Error

Solution code:
import sympy as sym

A = sym.sequence(N*(N+1)/2,(n, 1, 100))
print([int(N) for in A])

Submission status: Runtime Error

Solution code:
import sympy as sym

A = sym.sequence(N*(N+1)/2,(n, 1, 100))
print([int(N) for in A])
print(A[3])

Submission status: Runtime Error

Solution code:
asum = 1
1<N<100

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

print(asum)

Submission status: Runtime Error

Solution code:
asum = 1

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

print(asum)

Submission status: Runtime Error

Solution code:
import numpy as np 

np.arange(1, 100, N)

Submission status: Runtime Error

Solution code:
import numpy as np 

np.arange(1, 100, 1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
for i in (input()+1):
  x += i
print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
for i in range(N):
    print(i)

Submission status: Runtime Error

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