Problem:


Score : 100 points

Problem Statement

Takahashi is a member of a programming competition site, ButCoder.

Each member of ButCoder is assigned two values: Inner Rating and Displayed Rating.

The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or more contests. Otherwise, the Displayed Rating will be their Inner Rating minus 100 \times (10 - K) when the member has participated in K contests.

Takahashi has participated in N contests, and his Displayed Rating is R. Find his Inner Rating.

Constraints

All values in input are integers.

1 \leq N \leq 100

0 \leq R \leq 4111

Input

Input is given from Standard Input in the following format:

N R

Output

Print his Inner Rating.

Sample Input 1

2 2919

Sample Output 1

3719

Takahashi has participated in 2 contests, which is less than 10, so his Displayed Rating is his Inner Rating minus 100 \times (10 - 2) = 800.

Thus, Takahashi's Inner Rating is 2919 + 800 = 3719.

Sample Input 2

22 3051

Sample Output 2

3051



Sample input:
2 2919


Sample output:
3719

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())

mmod = 10**9 + 7


def comb_mod(n, r, mod=mmod):
    nume = 1
    deno = 1

    r = min(r, r - 1)

    for i in range(1, r + 1):
        nume = (nume * (n - i)) % mod
        deno = (deno * (i + 1)) % mod

    return (nume * pow(deno, mod - 2, mod)) % mod


if n == 2:
    print(0)
    exit

total = (pow(2, n, mmod) - comb_mod(n, a) - comb_mod(n, b) - 1) % mmod

print(total)

Submission status: Runtime Error

Solution code:
n,r=map(input().split())
if n<10:
  r=r+100*(10-n)
print(r)

Submission status: Runtime Error

Solution code:
N=input()
R=input()
Naibu = int(R) + 100*(10-int(N))
if int(N)<=9:
    print(Naibu)
else:
    print(R)

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())

if N<10:
  print(100*(10−K))
else:
  print(K)

Submission status: Runtime Error

Solution code:
from math import factorial
N, a, b = map(int, input().split())
m=0
for i in range(N):
    if i==a, or i==b
        k=0
        m=m+k
    if not i== a-1 or i==b-1:
        k= factorial(N) // ((factorial(N - (i+1)) * factorial(i+1)))
        m=m+k
    print(m)

Submission status: Runtime Error

Solution code:
from math import factorial
N, a, b = map(int, input().split())
m=0
for i in range(N):
    if not i== a-1 or i==b-1:
        k=factorial(N) // (factorial(N - (i+1)) * factorial(i+1))
        m=m+k
    print(m)

Submission status: Runtime Error

Solution code:
N, R = map(int, input().split())
def a(N,R):
     if N >= 10:
             print(R)
     else:
             print(R+(100*(10-N)))
     return
  
a()

Submission status: Runtime Error

Solution code:
a = input().split()
x = int(a[0])
y = int(a[1])
if x>=10:
    print(y)
else:
    print(y+1000-100x)

Submission status: Runtime Error

Solution code:
N = int(stdin.readline().rstrip())
A = int[stdin.readline().rstrip().split() for _ in range(n)]
P=round(sum(A)/N)
B=0
for i in range(N):
    B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
n = int(stdin.readline().rstrip())
data = int[stdin.readline().rstrip().split() for _ in range(n)]
P=round(sum(A)/N)
B=0
for i in range(N):
  B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
import sys
import os
f = open('input.txt', 'r')
sys.stdin = f

s = list(map(int, input().split()))
ans = 0

if s[0]<=10:
    ans = s[1]+100*(10-s[0])
else:
    ans = s[1]

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
P=round(sum(A)/N)
B=0
for i in range(N):
  B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [input() for i in range(N)]
P=round(sum(A)/N)
B=0
for i in range(N):
  B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
N = int(input())
a = [input() for i in range(N)]
P=round(sum(A)/N)
B=0
for i in range(N):
  B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
N = int(input())
a = [input() for i in range(N)]
P=round(sum(A)/N)
B=0
for i in range(N):
	B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split())) 
P=round(sum(A)/N)
B=0
for i in range(N):
	B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
N = input()
for i in range(N):
	A = [int(i) for i in input().split()]
P=round(sum(A)/N)
B=0
for i in range(N):
	B=B+(A[i]-P)**2
print(B)

Submission status: Runtime Error

Solution code:
def a(N,R):
     if N >= 10:
             print(R)
     else:
             print(R+(100*(10-K)))
     return

  
a(N,R)

Submission status: Runtime Error

Solution code:
n = list(map(int, input()))

n1 = n[0]
n2 = n[1]

if n1 < 10:
  print(n2 - (100*(10-n1)))
else:
  print(n2)

Submission status: Runtime Error

Solution code:
n = int(input())
r = int(input())
if n<10 and -1<n:
  	print(r+100*(10-n))
elif n>=10:
    print(r)

Submission status: Runtime Error

Solution code:
n = int(input())
r = int(input())
if n<10 and -1<n:
  	print(r+100(10-n))
elif n>=10:
    print(r)

Submission status: Runtime Error

Solution code:
input_line = int(input())
for i in range(input_line):
  s = input().rstrip().split(' ')
  print("hello = "+s[0]+" , world = "+s[1])

Submission status: Runtime Error

Solution code:
k, q = map(int, input().split())
d = list(map(int, input().split()))
for _ in range(q):
  n, x, m = map(int, input().split())
  dmod = [di % m for di in d]
  same = dmod.count(0) * ((n-1) // k) + dmod[: (n-1) % k].count(0)
  a_last = x + sum(dmod) * ((n-1) // k) + sum(dmod[: (n-1) % k])
  beyond = a_last // m - x // m
  print(n - 1 - same - beyond)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
md = []
while N != 0:
  md.append(N%K)
  N /= K
print(len(md)+1)

Submission status: Runtime Error

Solution code:
N, R = map(int, input().spit())
if N < 10:
  print(R+100*(10-N))
else:
  print(R)

Submission status: Runtime Error

Solution code:
N, R = map(int, input().spit())
if R < 10:
  print(R+100*(10-N))
else:
  print(R)

Submission status: Runtime Error

Solution code:
i = input().split()

N = int(i[0])
K = int(i[1])

result = ''
tmp = N
while tmp >= K:
    idx = str(tmp % K)
    result = idx + result
    tmp = int(tmp / K)
idx = str(tmp % K)
result = idx + result

print(result)

Submission status: Runtime Error

Solution code:
 N, R = map(int,input().split())
 print(type(N), N, R)

if N<10:
    R=R+100*(10-N)
    print(R)
else:
    print(R)

Submission status: Runtime Error

Solution code:
n = int(input())
cont = int(input())
if cont<10:
  x=100*(10-cont)
else:
  x=0
  
print(x+cont)

Submission status: Runtime Error

Solution code:
n,r=(int,input().split())
print(r if n>=10 else r+(100*(10-n)))

Submission status: Runtime Error

Solution code:
N, R = map(int, input())

if N >= 10:
  print(R)
else:
  print(R+100*(10-N))

Submission status: Runtime Error

Solution code:
n,a,b = [int(i) for i in input().split()]
mod = 10**9+7

def mpow(a,n):
  if n == 1:
    return a
  x = mpow(a,n//2)
  ans = x*x%mod
  if n%2==1:
    ans *= a
  return ans

def comb(n,a,b):
  if a < b:
    s, l = a, b
  else:
    s, l = b, a
  rs = 1
  for i in range(s):
    rs = rs*(n-i)%mod
  rl = rs
  for i in range(s,l):
    rl = rl*(n-i)%mod
  for i in range(1,s+1):
    rs = rs*mpow(i,mod-2)%mod
  rl = rl
  for i in range(s+1,l+1):
    rl = rl*mpow(i,mod-2)%mod
  if a < b:
    nCa, nCb = rs, rl
  else:
    nCa, nCb = rl, rs
  return nCa, nCb
nCa,nCb = comb(n,a,b)
print((mpow(2,n)-1-nCa-nCb)%mod)
# print(nCa,nCb)

Submission status: Runtime Error

Solution code:
スコード 

Copy
Copy
N, R = map(int, input().split())
 
if N > 10:
  print(R)
else:
  ans = R - (100*(10-R))
  print(ans)

Submission status: Runtime Error

Solution code:
n,r=map(int,input(),split())
if n >= 10:
    ans = r
else:
    ans = r + 1000 - 100 * n

Submission status: Runtime Error

Solution code:
n,r = map(int,input().split())
if n>=10:
    print(r)
else:
    print(100*(10-k))

Submission status: Runtime Error

Solution code:
s=input();print(100*max(0,10-int(s[:2]))+int(s[2:]))

Submission status: Runtime Error

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

if 0<=R<=4111 and 1<=N<=100:
    if N>=10:
        IR = R
        print(IR,end='\n')
    elif N<10:
        IR = R + 100*(10-N)
        print(IR,end='\n')

Submission status: Runtime Error

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

if 0<=R<=4111 and 1<=N<=100:
    if N>=10:
        IR = R
        print(IR,end='\n')
    elif N<10:
        IR = R + 100*(10-N)
        print(IR,end='\n')

Submission status: Runtime Error

Solution code:
def keta(n,k):
  cnt=0
  while(n!=0):
   	n//=k
 	cnt+=1
   	return cnt
     
N,K=map(int,input().split())
print(keta(N,K))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
cnt=0
while n>0:
    n=n//k
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
def framod(n, mod, a=1):
    for i in range(1,n+1):
        a=a * i % mod
    return a

def power(n, r, mod):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def comb(n, k, mod):
    a=framod(n, mod)
    b=framod(k, mod)
    c=framod(n-k, mod)
    return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod
n,a,b=map(int,input().split())
modd = 10**9+7
print(2**n-comb(n,a,modd)-comb(n,b,modd)-1)

Submission status: Runtime Error

Solution code:
import math
 
N = int(input())
X = list(map(int, input().split()))
sum = 0
all = True
for a in X:
    sum = sum + a
C = int(sum / N + 0.5)
ans = 0
for b in X:
    ans = ans + (b-C)**2
print(ans)

Submission status: Runtime Error

Solution code:
input(int(N))
input(int(R))
if N >= 10:
  print(R)
else:
  print(R+100*(10-N))

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
res = 0
while n >= k:
  res += 1
  n //= k
print(res+1)

Submission status: Runtime Error

Solution code:
n, r = map(int, input.split())
if n >= 10:
  print(r)
else:
  print(r+100*(10-n))

Submission status: Runtime Error

Solution code:
N,R = map(int, input.split())

if (N < 10):
    print(R + ((10 - N) * 100))
else:
    print(R)

Submission status: Runtime Error

Solution code:
import string
numbers = "0123456789"
alphabets = string.ascii_letters # a-z+A-Zをロード
characters = numbers + alphabets
NK=list(map(int,input().split()))
n=NK[0]
k=NK[1]
result = ''
while n>=k:
    idx=n%k
    result=characters[idx]+result
    n=int(n/k)
    idx=n%k
    result=characters[idx]+result
result=str(result)
print(len(result))

Submission status: Runtime Error

Solution code:
[s, t] = input().split()
[a, b] = input().split()
u = input()

if (u == s):
    a = int(a) - 1
else:
    b = int(b) - 1

print(a, b)

Submission status: Runtime Error

Solution code:
import math
n,a,b=map(int,input().split())
c=0
for i in range(1,n+1):
    c+=(math.factorial(n)//(math.factorial(n - i) * math.factorial(i)))%(pow(10,9)+7)

c=c-(math.factorial(n)//(math.factorial(n - a) * math.factorial(a)))%(pow(10,9)+7)
c=c-(math.factorial(n)//(math.factorial(n - b) * math.factorial(b)))%(pow(10,9)+7)
print(c)
#TLE

Submission status: Runtime Error

Solution code:
N,R = list(map(int, input().split()))
if K >= 10:
  print(R)
else:
  print(R + 100 * (10-K))

Submission status: Runtime Error

Solution code:
import math
n,a,b = map(int,input().split())
mod = 10**9+7
ans = pow(2,n,mod)
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7
N = 10**4
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range(2, N + 1):
    g1.append( (g1[-1]*i) % mod)
    inverse.append( (-inverse[mod % i] * (mod//i)) % mod)
    g2.append( (g2[-1]*inverse[-1]) % mod)
ans = ans-(cmb(n,a,mod)+cmb(n,b,mod))-1
print(ans)

Submission status: Runtime Error

Solution code:
def mpow(x: int, k: int, MOD=1000000007) -> int:
    """
    x^kのmodを返します
    """
    res = 1
    y = x
    while (k):
        if(k % 2 == 1):
            res = (res * y) % MOD
        y = (y ** 2) % MOD
        k = k // 2
    return res
'''
def cmb(n, x, mod=10**9+7):
    # nCx
    # 組み合わせ
    # ex) combination(5, 2) = 10
    factorial = [1] * (n+1)
    t = 1
    for i in range(1, n+1):
        t = (t * i) % mod
        factorial[i] = t
    tmp = factorial[n]
    tmp = (tmp * pow(factorial[x], mod-2, mod)) % mod
    tmp = (tmp * pow(factorial[n-x], mod-2, mod)) % mod
    return tmp
'''
mod = 10**9+7 #出力の制限

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

print(mpow(2,10**9))

num = 1000000000 + 7

MAX_NUM = N
MOD = 10**9+7

fac  = [0 for _ in range(MAX_NUM)]
finv = [0 for _ in range(MAX_NUM)]
inv  = [0 for _ in range(MAX_NUM)]

fac[0]  = fac[1] = 1
finv[0] = finv[1] = 1
inv[1] = 1

for i in range(2,MAX_NUM):
    fac[i] = fac[i-1] * i % MOD
    inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
    finv[i] = finv[i-1] * inv[i] % MOD

def cmb(n,k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD

#print(mpow(2,N))

print(mpow(2,N)- cmb(N, a) - cmb(N, b) -1)

Submission status: Runtime Error

Solution code:
n,r=map(int,input().split())

if n=>10:
  print(r)
else:
  print(r+1000-100*n)

Submission status: Runtime Error

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

def main():
    def calc(n, mod):
        f = 1
        for m in range(1, n + 1):
            f *= m
            f %= mod
        fn = f
        inv = pow(f, mod - 2, mod)
        invs = [1] * (n + 1)
        invs[n] = inv
        for m in range(n, 1, -1):
            inv *= m
            inv %= mod
            invs[m - 1] = inv 
        return fn, invs

    mod = 10**9+7
    n,a,b=map(int,input().split())
    ans=0
    fn,invs=calc(n,mod)
    for i in range(1,n+1):
        if i==a or i==b:
            continue
        else:
            ans+=(invs[i]*invs[n-i])%mod
    print((fn*ans)%mod)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

struct Sieve {
  int n;
  vector<int> f, primes;
  Sieve(int n=1):n(n), f(n+1) {
    f[0] = f[1] = -1;
    for (ll i = 2; i <= n; ++i) {
      if (f[i]) continue;
      primes.push_back(i);
      f[i] = i;
      for (ll j = i*i; j <= n; j += i) {
        if (!f[j]) f[j] = i;
      }
    }
  }
  bool isPrime(int x) { return f[x] == x;}
  vector<int> factorList(int x) {
    vector<int> res;
    while (x != 1) {
      res.push_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<P> factor(int x) {
    vector<int> fl = factorList(x);
    if (fl.size() == 0) return {};
    vector<P> res(1, P(fl[0], 0));
    for (int p : fl) {
      if (res.back().first == p) {
        res.back().second++;
      } else {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};
//mint
const int mod = 1000000007;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};
//BIT
template<typename T>
struct BIT {
  int n;
  vector<T> d;
  BIT(int n=0):n(n),d(n+1) {}
  void add(int i, T x=1) {
    for (i++; i <= n; i += i&-i) {
      d[i] += x;
    }
  }
  T sum(int i) {
    T x = 0;
    for (i++; i; i -= i&-i) {
      x += d[i];
    }
    return x;
  }
};
//combination
struct combination {
  vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
};
//gcd and lcm
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
//prime

int main() {
  int a,b;
  cin>>a>>b;
  if(a>=10){
  cout <<b<<endl;
  }else{
  cout<<b+100*(10-2)<<endl;
  }
  
  return 0;

}

Submission status: Runtime Error

Solution code:
input().split().
if K => 10:
  print(R)
else:
  print(R + 100 * (10-K))

Submission status: Runtime Error

Solution code:
m,n=map(int,input().split()) 
k=10-m 
if(k<0) 
k=0 
print(n+100*k)

Submission status: Runtime Error

Solution code:
n,r=map(int,input().split())

if n=>10:
  print(r)
else:
  print(r+10000-100*n)

Submission status: Runtime Error

Solution code:
n,a,b = map(int,input().split())

count = 0
p = 10**9+7

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]

range2_n1 = range(2, n+1)
range1_n1 = range(1, n+1)

for i in range2_n1:
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

for m in range1_n1:
    if not (m == a or m == b):
        count += cmb(n,m,p)
        count %= p

print(count)

Submission status: Runtime Error

Solution code:
def nCrModpDP(n, r, p): 
    C = [0] * (n + 1); 
    C[0] = 1;  
    for i in range(1, (n + 1)): 
        j = min(i, r);  
        while(j > 0): 
            C[j] = (C[j] + C[j - 1]) % p; 
            j -= 1; 
    return C[r]; 
def nCrModpLucas(n, r, p): 
    if (r == 0): 
        return 1; 
    ni = int(n % p); 
    ri = int(r % p); 
    return (nCrModpLucas(int(n / p), int(r / p), p) * 
            nCrModpDP(ni, ri, p)) % p; # Remaining digits 
p = int(10**9+7)
n,a,b= map(int,input().split())
if a>n/2:
    a=n-a
if b>n/2:
    b=n-b
nca = nCrModpLucas(n,a,p)
ncb = nCrModpLucas(n,b,p)
print(int(2**n - 1 - nca - ncb)%(10**9+7))

Submission status: Runtime Error

Solution code:
import statistics

def cal_hp(p, num_list):
    total = 0
    for num in num_list:
        temp = (num - p) ** 2
        total = total + temp
    return total

line1 = input()
line2 = input()

num_list = line2.split(" ")
num_list = [int(n) for n in num_list]
ans_list = []

for i in range(0, max(num_list)+1):
    ans_list.append(cal_hp(i, num_list))
print(min(ans_list))

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split(" "))
if N<10:
  print(a+(100*(10-N)))
else:
  print(M)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
if N<10:
  print(a+(100*(10-N)))
else:
   print(M)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
if N<10:
  print(a+(100*(10-N)))
 else:
  print(M)

Submission status: Runtime Error

Solution code:
import math
n,a,b = [int(x) for x in input().rstrip().split()]
n1=1
st=1
ans=0
for i in range(1,n+1):
    n1=n1*(n-i+1)
    st=st*i
    if i==a or i==b:
        continue
    else:
        ans+=(n1//st)%(10**9+7)
 
print(ans)

Submission status: Runtime Error

Solution code:
N=k
N<10
X=100*(10-N)
 Y=R+X
  print(Y)
N>10
 Y=R
  print(Y)

Submission status: Runtime Error

Solution code:
import math
n,a,b = [int(x) for x in input().rstrip().split()]
l=[]
n1=1
st=1
ans=0
for i in range(1,n+1):
    n1=n1*(n-i+1)
    st=st*i
    ans1 = (n1//st)
    if i==a or i==b:
        l.append(n1//st)
        continue
    else:
        if n<(i/2):
            ans+=l[n-i]
        else:
            ans+=ans1
            l.append(ans1)

print(ans%(10**9+7))

Submission status: Runtime Error

Solution code:
from sys import stdin
from math import factorial


def comb(n, x):
    return factorial(n) // (factorial(x) * factorial(n - x))


def main():
    N, A, B = [int(x) for x in stdin.readline().rstrip().split()]
    result = sum([comb(N, i) for i in range(1, N + 1) if i != A and i != B])
    print(int(result % (1e9+7)))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N, R = map(int, input().split()) 
if(N >= 10):
  return R
else:
  return 100*(10-N) + R

Submission status: Runtime Error

Solution code:
n = int(input())
x = list( map(int,input().split()) )

#print(max(x),min(x))

min_hp = 1000000000000000
for p in range(min(x),max(x)+1):
    hp = 0
    for i in x:
        hp +=(i-p)**2
        # print(p,i,hp)
    if min_hp > hp:
        min_hp = hp

print(min_hp)

Submission status: Runtime Error

Solution code:
from math import log, ceil
print(ceil(int(log(*map(int, input().split())) - 0.001) + 0.001))

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())

from math import factorial
ans = 0

if n % 2 == 1:
    for i in range(1, n // 2 + 1):
        ans += factorial(n) // factorial(i) // factorial(n - i)
    ans *= 2 + 1
else:
    for i in range(1, n // 2):
        ans += factorial(n) // factorial(i) // factorial(n - i)
    ans *= 2
    ans += factorial(n) // factorial(n // 2) // factorial(n - n // 2) + 1

ans -= factorial(n) // factorial(a) // factorial(n - a)
ans -= factorial(n) // factorial(b) // factorial(n - b)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input(""))
R = int(input(""))
if N <=10:
  R = R + (100*(10-N))
print(R)

Submission status: Runtime Error

Solution code:
N,R=map(int, input().split()) 

if N => 10
print(R)
else
print(R - 100*(10-N))

Submission status: Runtime Error

Solution code:
N,R = map(int,input().split())
ans = 100*(10-N)+R
if N>=10:
  print(R)
 else:
  print(ans)

Submission status: Runtime Error

Solution code:
N = int(input("N"))
R = int(input("R"))
if N <=10: R = R + (100*(10-N))

Submission status: Runtime Error

Solution code:
N = int(input("N"))
R = int(input("R"))
if N <=10:
  R = R + (100*(10-N))

Submission status: Runtime Error

Solution code:
N = int(input("N"))
R = int(input("R"))
if N <=10:
  R = R + (100*(10-N))

Submission status: Runtime Error

Solution code:
N,R=int(input().split())
c=0
if N>=10:
  c=R
else:
  c=R+100*(10-c)
print(c)

Submission status: Runtime Error

Solution code:
n, k =map(int, input().split())

def base10to(n, k):
    if (int(n/k)):
        return base10to(int(n/k), k) + str(n%k)
    return str(n%k)

a = base10to(n, k)
print(len(a))

Submission status: Runtime Error

Solution code:
a=map(int,zip(input()))

if a[0]<10:
  return (10-a[0])*100+a[1]
else:
  return a[1]

Submission status: Runtime Error

Solution code:
def resolve():
    import statistics
    n = input()
    x = list(map(int, input().split()))
    m = round(statistics.mean(x))
    sum_val = 0
    for val in x:
        sum_val += (val - m) ** 2

    print(sum_val)

if __name__ == '__main__':
    resolve()

Submission status: Runtime Error

Solution code:
N = int(input())
R = int(input())
if N >= 10:
  print(R)
else:
  print(R + 100*(10-N))

Submission status: Runtime Error

Solution code:
N = int(input("N"))
R = int(input("R"))
if N<=10:
  R = R + (100*(10-N))

Submission status: Runtime Error

Solution code:
N = input()
X = list(map(int, input().split()))
for a in X:
    sum = sum + a
C = sum/N
for b in X:
    ans = (b-C)**2
print(ans)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
def Base_10_to_n(X, A):
    if (int(X/A)):
        return Base_10_to_n(int(X/A), A)+str(X%A)
    return str(X%A)
ans = Base_10_to_n(n,k)
print(len(ans))

Submission status: Runtime Error

Solution code:
N,R=int(input( ).split( ))
ans=0
if N>=10:
  ans=R
  
else:
  ans=R+100*(10-N)
 
print(ans)

Submission status: Runtime Error

Solution code:
N,R = map(int,input().split())
 
if N >= 10:
  print(R)
else:
  print(R + 100*(10-K))

Submission status: Runtime Error

Solution code:
a=int(input())
b=list(map(int,input().split()))
c=0
m=0
for i in b:
    c+=i
d=c/len(b)
e=str(d)[2]
e=int(e)
if e>=5:
    f=int(str(d)[0])+1
else:
    f=int(str(d)[0])
for g in b:
    m+=(abs(g-f))**2
print(m)

Submission status: Runtime Error

Solution code:
N,R=int(input().split())
ans=0
if N>=10:
  ans=R
  
else:
  ans=R+100*(10-N)
 
print(ans)

Submission status: Runtime Error

Solution code:
N, p = map(int,input().split())
if N < 10:
    K = 100 * (10 - N)
    print(p + K)
else:
    print(P)

Submission status: Runtime Error

Solution code:
N,R = map(int,input().split())

if K >= 10:
  print(R)
else:
  print(R + 100*(10-K))

Submission status: Runtime Error

Solution code:
N=int(input("N: "))
R=int(input("R: "))
if N<10:
  R = R + (100*(10-N))
else:
  print(R)

Submission status: Runtime Error

Solution code:
N,R=int(input().split())
ans=0
if N>=10:
  ans=R
  
else:
  ans=R-100*(10-N)
 
print(ans)

Submission status: Runtime Error

Solution code:
import math

N,K = map(int,input().rstrip().split(" "))
if N > 0:
  print(math.ceil(math.log(N+1,K)))
else:
  print(1)

Submission status: Runtime Error

Solution code:
int(input(a,b))
if a >= 10:
  x = b
else:
  x = b+100*(10-a)
print(x)

Submission status: Runtime Error

Solution code:
N = input("N: ")
R = input("R: ")
N = int(N)
R = int(R)
if N<10:
  A = (100*(10-N))
  R = R + A
  print(R)
else:
  print(R)

Submission status: Runtime Error

Solution code:
i = list(map(int, input().split()))
N=i[0]
K=i[1]
def abc(N,K,x):
    if N-(K**x)>=0:
      abc(N,K,x+1)
    else:
        print(x)
abc(N,K,1)

Submission status: Runtime Error

Solution code:
N = int(input())
X = list(map(int,input().rstrip().split(" ")))
ans = 0
ansb = 0
for i in range(100):
  ansb = 0
  for i2 in range(N):
    ansb += (X[i2] - i)**2
  if i == 0 or ans > ansb:
    ans = ansb
print(ans)

Submission status: Runtime Error

Solution code:
def toStr(n,base):
    convertString = "0123456789ABCDEF"
    if n < base:
        return convertString[n]
    else:
        return toStr(n//base,base) + convertString[n%base]

a,b = map(int,input().split())
print(len(toStr(a,b)))

Submission status: Runtime Error

Solution code:
a,b =map(input().split())
if a<10:a=10-a
else:a=0
print(b+ (a*100))

Submission status: Runtime Error

Solution code:
	if N<10:
  		return (R+100*(10-N))
	else:
      return R

Submission status: Runtime Error

Solution code:
n= int(input())
r = int(input())
k = 0
if(n<10):
    k=100*(10-n)+r
    print(k)
else:
    print(r)

Submission status: Runtime Error

Solution code:
n= int(input())
r = int(input())
k = 0
if(n<10):
    k=100*(10-n)
    print(k)
else:
    print(r)

Submission status: Runtime Error

Solution code:
n = int(input())
r = int(input())
if (n<10):
  print(100*(10-n)+r)
else:
   print(r)

Submission status: Runtime Error

Solution code:
n = [i for i in input().split()]
a = n[0]
b = n[1]
if a < 10:
  b += (10-a)*100
print(b)

Submission status: Runtime Error

Solution code:
N, R = input().split()

if N<10:
  K = 100*(10-N)
  print(R+K)
else:
  print(N)

Submission status: Runtime Error

Solution code:
N = int(input("N: "))
R = int(input("R: "))
if N<10:
  R = R+(100*(10-N))
  print(R)
else:
  print(R)

Submission status: Runtime Error

Solution code:
N, R = int(input())
if N >= 10:
  print(R)
else: 
  print ( 100 * (10 - R) + N)

Submission status: Runtime Error

Solution code:
N = int(input())
X = list(map(int, input().split()))
X_max = max(X)
ans = float('inf')
for i in range(X_max + 1):
    tmp_ans = 0
    for x in X:
        tmp_ans += (x - i) ** 2
    if tmp_ans < ans:
        ans = tmp_ans
print(ans)

Submission status: Runtime Error

Solution code:
n,r = input().split()
if int(n) >= 10:
  h = int(r)
else:
  h = int(r) + (100 * (10-n))
print(h)

Submission status: Runtime Error

Solution code:
N, R = input().split()

if N<10:
  print(R+100*(10-N))
else:
  print(N)

Submission status: Runtime Error

Solution code:
N = input("N: ") R = input("R: ")
N = int(N)
R = int(R)
if N<10:
  R = R+(100*(10-N))
  print(R)
else:
  print(R)

Submission status: Runtime Error

Solution code:

def hello():
    N = int(input()) 
    R = int(input())
    if N >= 10: 
        print R 
    else: 
        print 100 * ( 10 - N ) + R
hello()

Submission status: Runtime Error

Solution code:
N,R = map(int,input())

if N >= 10:
  print(R)
else:
  print(R-100*(10-N))

Submission status: Runtime Error

Solution code:
attend, rate = input()

if int(attend) >= 10:
  print(rate)
else:
  print(int(rate) - 100 * (10 - int(attend)))

Submission status: Runtime Error

Solution code:
N = input("N: ");
R = input("R: ");
N = int(N)
R = int(R)
if N<10:
  R = R+(100*(10-N))
  print(R)
else:
  print(R)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
i = N
count = 1
while i >= K:
    i //= K
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
n,r = input().split()
if n >= 10:
  h = r
else:
  h = r + (100 * (10-n))
print(h)

Submission status: Runtime Error

Solution code:
N = int(input())
R = int(input())
if N >= 10: 
  return R 
else: 
  return 100 * ( 10 - N ) + R

Submission status: Runtime Error

Solution code:
N = int(input())
R = int(input())
if N > 1 & N <100 & R > 0 & R < 4111 :
  if N >= 10 :
    print(R)

  else :
    print(R-100*(10-N))
else:
  print('error')

Submission status: Runtime Error

Solution code:
n = [i for i in input().split()]
a = n[1]
b = n[2]
if a < 10:
  b += (10-a)*100
print(b)

Submission status: Runtime Error

Solution code:
N = input("N: ")
print(N)
R = input("R: ")
N = int(N)
R = int(R)
if N<10:
  R = R+(100*(10-N))
  print(R)
else:
  print(R)

Submission status: Runtime Error

Solution code:
if N<10 then R + 100*(10-N)
else R

Submission status: Runtime Error

Solution code:
n, r = int(input())
k = 0
if(n<10):
    k=100*(10-n)
    print(k)
else:
    print(r)

Submission status: Runtime Error

Solution code:
n = [i for i in input().split()]
a = n[1]
b = n[2]
if a <10:
  b += (10-a)*100
print(b)

Submission status: Runtime Error

Solution code:
N = input("N: ")
R = input("R: ")
N = int(N)
R = int(R)
if N<10:
  R = R+(100*(10-N))
  print(R)
else:
  print(R)

Submission status: Runtime Error

Solution code:
N, R = list(map(int, input().split(' ')))
if N >= 10:
    print(R)
else:
    print(R + (100 - (10 - K)))

Submission status: Runtime Error

Solution code:
n = int(input())

if n > 10:
    print(n)
else:
    R = 100*(10 - n)
    print(R)

Submission status: Runtime Error

Solution code:
n, r = input().split(" ")
if n<10:
    print((100*(10-n))+r)
else:
    print(r)

Submission status: Runtime Error

Solution code:
n, r = input().split()

def calc(n, r):
  if n >= 10:
    return n
  else:
    return 100*(10-r)

return calc(n,r)

Submission status: Runtime Error

Solution code:
input = input().split(" ")
if int(input[0]) > 10:
  c = 10 - int(input[0])
  r = 100 * int(c)
  print(r)
else:
  print(input[1]

Submission status: Runtime Error

Solution code:
inp = input().split(" ")
N = int(inp[0])
R = int(inp[1])
if N >= 10:
    iner_r = R
else:
    iner_r  = R + 100*(10-N)
return iner_r

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
 
if n[0] > 10:
  print(l[1])
else:
  print(n[1] + 100*(10-n[0]))

Submission status: Runtime Error

Solution code:
n, k = map(int,input().slpit())
print(k+(100*(10-k)) if n<10 else k)

Submission status: Runtime Error

Solution code:
n,r=map(int(input().split(' ')))
if n<10:
  print(100*(10-n)+r)
else:
  print(r)