Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03166 (python)

Fixed submission:
from collections import deque

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

dp = [0] * N
E = [[] for _ in range(N)]
deg = [0] * N
for _ in range(M):
    x, y = map(int, input().split())
    E[x-1].append(y-1)
    deg[y-1] += 1

que = deque(v for v in range(N) if deg[v] == 0)
while que:
    v = que.pop()
    for u in E[v]:
        deg[u] -= 1
        if deg[u] == 0:
            que.appendleft(u)
            dp[u] = max(dp[u], dp[v] + 1)

print(max(dp))

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
dp = [-1] * (10 ** 5 + 7)

def rec(v):
    if dp[v] != -1:
        return dp[v]
    res = 0
    for u in E[v]:
        res = max(res, rec(u) + 1)
    dp[v] = res
    return dp[v]

E = [[] for _ in range(N)]
for _ in range(M):
    x, y = map(int, input().split())
    E[x-1].append(y-1)

ans = 0
for v in range(N):
    ans = max(ans, rec(v))

print(ans)
Problem p03434 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
print(sum(A[::2]) - sum(A[1::2]))

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
X = list(map(int, input().split()))
res = 0
for x in X:
    res += 2 * min(x, K - x)
print(res)
Problem p03579 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)

def is_bipartite(v, d):
    color[v] = d
    for u in E[v]:
        if color[u] == d:
            return False
        elif color[u] != -1:
            continue
        if not is_bipartite(u, (d + 1) % 2):
            return False
    return True

N, M = map(int, input().split())
E = [[] for _ in range(N)]
color = [-1] * N

for _ in range(M):
    a, b = map(int, input().split())
    E[a-1].append(b-1)
    E[b-1].append(a-1)

if is_bipartite(0, 0):
    b = sum(color)
    w = N - b
    print(b * w - M)
else:
    print(N * (N - 1) // 2 - M)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10 ** 6)

def is_bipartite(v, r, d):
    color[v] = d
    for u in E[v]:
        if u == r:
            continue
        if color[u] == d:
            return False
        is_bipartite(u, v, (d + 1) % 2)
    return True

N, M = map(int, input().split())
E = [[] for _ in range(N)]
color = [-1] * N

for _ in range(M):
    a, b = map(int, input().split())
    E[a-1].append(b-1)
    E[b-1].append(a-1)

if is_bipartite(0, -1, 0):
    b = sum(color)
    w = N - b
    print(b * w - M)
else:
    print(N * (N - 1) // 2 - M)
Problem p03697 (python)

Fixed submission:
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

[print(A+B) if A+B < 10 else print('error')]

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

A, B = map(int, input())

[print(A+B) if A+B < 10 else print('error')]

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

A = int(input())
B = int(input())

[print(A+B) if A+B < 10 else print('error')]
Problem p03700 (python)

Fixed submission:
import math

def bs(n, a, b, hp, min=0, max=10**9):
    left = min
    right = max
    def count(num):
        base = b * num
        attackcount = 0
        diff = a-b
        for i in range(n):
            tmp = math.ceil((hp[i] - base) / diff)
            if tmp <= 0:
                pass
            else:
                attackcount += tmp
        if attackcount <= num:
            return True
        else:
            return False
    while left != right:
        mid = (left + right) // 2
        if count(mid):
            right = mid
        else:
            left = mid + 1
    return left

if __name__ == '__main__':
    n, a, b = map(int, input().split())
    hp = [int(input()) for i in range(n)]
    print(bs(n, a, b, hp))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, A, B = map(int, input().split())
H = [int(input()) for x in range(N)] 
c = 0

while H:
    index = max(enumerate(H), key=lambda x: x[1])[0]
    H[index] -= A
    H = [H[x]-B for x in range(len(H)) if x!=index]
    I = [x for x in range(len(H)) if H[x] <= 0]
    [H.pop(x) for x in I]
    c += 1

print(c)
Problem p03711 (python)

Fixed submission:
# -*- coding: utf-8 -*-

A = set([1,3,5,7,8,10,12])
B = set([4,6,9,11])
C = set([2])

x, y = map(int, input().split())

if x in A and y in A:
    print("Yes")

elif x in B and y in B:
    print("Yes")

elif x in C and y in C:
    print("Yes")

else:
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

H, W = map(int, input().split())
A = []
for i in range(H):
    A.append("#")
    a = input()
    A[i] += a + "#"

A = ["#" * (W+2)] + A + ["#" * (W+2)]

for i in A:
    print(i)
Problem p03712 (python)

Fixed submission:
# -*- coding: utf-8 -*-

H, W = map(int, input().split())
A = []
for i in range(H):
    A.append("#")
    a = input()
    A[i] += a + "#"

A = ["#" * (W+2)] + A + ["#" * (W+2)]

for i in A:
    print(i)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

H, W = map(int, input().split())
A = []
for i in range(H):
    A.append("#")
    for j in range(W):
        a = input()
        A[i] += a
    A[i] += "#"

A = ["#" * (W+2)] + A + ["#" * (W+2)]

for i in A:
    print(i)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

H, W = map(int, input().split())
A = []
for i in range(H):
    for j in range(W):
        A[i] += input()

A = ["#" * W+2] + A + ["#" * W+2]

for i in A:
    print(i)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

H, W = map(int, input().split())
A = [H]

for i in range(1, H):
    a = input()
    A[i] = ['#' + a + '#']

fr = '#' * (W+2)
A = [fr] + A + [fr]

for i in A:
    print(i)

print('#' + 1 + '#')
Problem p02606 (python)

Fixed submission:
def getInts():
    return [ int(x) for x in input().split() ]

[L,R,d] = getInts()

c = 0
for i in range(L, R+1):
    if i%d==0:
        c+=1
print(c)

Buggy submission (verdict: Runtime Error):
from collections import deque

def getInts():
    return [ int(x) for x in input().split() ]

def complement(c):
    if c=='1':
        return '0'
    else:
        return '1'

H = {}

def pop(n):
    return "{0:b}".format(n).count('1')
def toZero(n):
    if n==0:
        return 0
    if n==1:
        return 1
    if n in H:
        return H[n]
    r = 1 + toZero(n%pop(n))
    H[n] = r
    return r

[N] = getInts()
X = input()
Xi = int(X, 2)
X = list(X)

i=0
p = pop(Xi)
while 2**i < Xi:
    toZero(2**i%(p+1))
    toZero(2**i%(p-1))
    i+=1
for i in range(N):
    X[i] = complement(X[i])
    n = int("".join(X),2)
    print(toZero(n))
    X[i] = complement(X[i])
Problem p02690 (python)

Fixed submission:
from collections import deque

def getInts():
    return [ int(x) for x in input().split() ]

def f(A,B):
    return A**5 - B**5

[X] = getInts()
Q = deque([(0,0)])
V = set()
A, B = 0,0
r = []
while not r:
    (A,B) = Q.pop()
    l = [(A+1,B),(A,B+1),(A+1,B+1)]
    l = filter(lambda x: x not in V, l)
    for each in l:
        V.add(each)
        Q.appendleft(each)
    
    r = list(filter(lambda x: f(*x)==X, [(A,B), (A,-B), (-A,B), (-A, -B)]))

print(r[0][0], r[0][1])

Buggy submission (verdict: Runtime Error):
def getInts():
    return [ int(x) for x in input().split() ]

def f(B):
    return (X + B**5 ) ** (1/float(5))

[X] = getInts()

BP = 0
BN = 0
while not f(BP).is_integer() and not f(BN).is_integer():
    BP += 1
    BN -= 1

if f(BP).is_integer():
    print(str(int(f(BP))) + " " + str(BP))
else:
    print(str(int(f(BN))) + " " + str(BN))
Problem p03633 (python)

Fixed submission:
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

n = int(input())

res = 1
for i in range(n):
    a = int(input())
    g = gcd(res, a)
    res = (res // g) * a

print(res)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

n = int(input())

res = 1
for i in range(n):
    a = int(input())
    g = gcd(res, a)
    res = int(res / g) * a

print(res)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

n = int(input())

res = 1
for i in range(n):
    a = int(input())
    g = gcd(res, a)
    res = int(res * a / g)

print(res)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

n = int(input())

res = 1
for i in range(n):
    a = int(input())
    g = gcd(res, a)
    res = int(res * a / g)

print(str(res))
Problem p02658 (python)

Fixed submission:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    n=int(readline())
    a=list(map(int,readline().split()))
    ans=1

    flag_zero=False
    for i in range(n):
        if a[i]==0:
            flag_zero=True

    if flag_zero:
        print(0)
    else:
        flag=True
        for i in range(n):
            ans*=a[i]
            if ans>10**18:
                flag=False
                break

        if flag:
            print(ans)
        else:
            print(-1)

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
for i in range(n):
    ans*=a[i]
    if ans>10**18:
        print(-1)
        break
else:
    print(ans)
Problem p02677 (python)

Fixed submission:
from sys import stdin
from math import sin,cos,pi
def main():
    #入力
    readline=stdin.readline
    A,B,H,M=map(int,readline().split())

    s=M*pi/30
    t=(H/6)*pi+(M/360)*pi
    x_A=A*sin(t)
    y_A=A*cos(t)

    x_B=B*sin(s)
    y_B=B*cos(s)

    print(((x_A-x_B)**2+(y_A-y_B)**2)**0.5)
    
if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
from math import sin,cos,pi
def main():
    #入力
    readline=stdin.readline
    A,B,H,M=map(int,readline().split())

    s=M*pi/30
    t=(H/6)*pi+(M/360)*pi
    x_A=A*sin(t)
    y_A=A*cos(t)

    x_B=B*sin(s)
    y_B=B*cos(s)

    print(((x_A-x_B)**2+(y_A-y_B)**2)**0.5)
if __name__=="__main__":
    main()
Problem p02775 (python)

Fixed submission:
import sys
def main():
    input=sys.stdin.readline
    S=input().strip()
    dp=[[0,0] for i in range(len(S)+1)]
    dp[0][1]=1
    for i in range(1,len(S)+1):
        for j in (0,1):
            if j==0:
                dp[i][0]=min(dp[i-1][0]+int(S[i-1]),dp[i-1][1]+10-int(S[i-1]))
            elif j==1:
                dp[i][1]=min(dp[i-1][0]+int(S[i-1])+1,dp[i-1][1]+10-int(S[i-1])-1)

    print(dp[len(S)][0])

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
def main():
    input=sys.stdin.readline
    S=input()
    dp=[[0,0] for i in range(len(S)+1)]
    dp[0][1]=1
    for i in range(1,len(S)+1):
        for j in (0,1):
            if j==0:
                dp[i][0]=min(dp[i-1][0]+int(S[i-1]),dp[i-1][1]+10-int(S[i-1]))
            elif j==1:
                dp[i][1]=min(dp[i-1][0]+int(S[i-1])+1,dp[i-1][1]+10-int(S[i-1])-1)

    print(dp[len(S)][0])

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
def main():
    input=sys.stdin.readline
    S=input()
    dp=[[0,0] for i in range(len(S)+1)]
    dp[0][1]=1
    for i in range(1,len(S)+1):
        for j in (0,1):
            if j==0:
                dp[i][0]=min(dp[i-1][0]+int(S[i-1]),dp[i-1][1]+10-int(S[i-1]))
            elif j==1:
                dp[i][1]=min(dp[i-1][0]+int(S[i-1])+1,dp[i-1][1]+10-int(S[i-1])-1)

    print(dp[len(S)][0])

if __name__=="__main__":
    main()
Problem p02787 (python)

Fixed submission:
H,N=map(int,input().split())
A=[]
B=[]
for i in range(N):
   a,b=map(int,input().split())
   A.append(a)
   B.append(b)

DP=[[0]*(H+max(A)) for i in range(N)]
DP.insert(0,[10**8+1]*(H+max(A)))
DP[0][0]=0

for i in range(1,N+1):
   for j in range(1,H+max(A)):
      if j-A[i-1]>0:
         DP[i][j]=min(DP[i-1][j],DP[i][j-A[i-1]]+B[i-1])
      else:
         DP[i][j]=min(DP[i-1][j],B[i-1])

print(DP[N][H])

Buggy submission (verdict: Runtime Error):
import math
H,N=map(int,input().split())
A=[]
B=[]
for i in range(N):
   a,b=map(int,input().split())
   A.append(a)
   B.append(b)

DP=[[0]*(H+1) for i in range(N)]
DP.insert(0,[math.inf]*(H+max(A)))
DP[0][0]=0

for i in range(1,N+1):
   for j in range(1,H+1):
      if j-A[i-1]>0:
         DP[i][j]=min(DP[i-1][j],DP[i][j-A[i-1]]+B[i-1])
      else:
         DP[i][j]=min(DP[i-1][j],B[i-1])

print(DP[N][H])
Problem p02821 (python)

Fixed submission:
N, M = map(int, input().split())
a = [10**18] + sorted(map(int, input().split()), reverse=True)


def solve(x):
   count = 0
   j = N
   for i in range(1, N+1):
      while a[i] + a[j] < x:
         j -= 1
      count += j
   
   return count


left, right = 0, 10**18
while left < right - 1:
   mid = (left + right) // 2
   if solve(mid) >= M:
      left = mid
   else:
      right = mid

acc = a[:]
acc[0] = 0
for i in range(N):
   acc[i+1] += acc[i]

ans = 0
j = N
for i in range(1, N+1):
   while a[i] + a[j] < left+1:
      j -= 1
   ans += a[i]*j + acc[j]
   M -= j

if M:
   ans += left * M

print(ans)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = [10**18] + sorted(map(int, input().split()), reverse=True)


def solve(x):
   count = 0
   j = N
   for i in range(1, N+1):
      while a[i] + a[j] < x:
         j -= 1
      count += j
   
   return count


left, right = 0, 10**18
while left < right - 1:
   mid = (left + right) // 2
   if solve(mid) >= M:
      left = mid

   else:
      right = mid

acc = a
acc[0] = 0
for i in range(N):
   acc[i+1] += acc[i]

ans = 0
j = N
for i in range(1, N+1):
   while a[i] + a[j] < left+1:
      j -= 1
   ans += a[i]*j + acc[j]
   M -= j

if M:
   ans += left * M

print(ans)
Problem p02883 (python)

Fixed submission:
N,K=input().split()
N,K=[int(N),int(K)]
A=list(map(int,input().split()))
F=list(map(int,input().split()))

A=sorted(A)
F=sorted(F,reverse=True)

goal_max=10**12+1
goal_min=0-1

while(goal_max-goal_min!=1):
   goal=(goal_max+goal_min)//2
   counter=0

   for i in range(N):
      counter+=max(0,A[i]-goal//F[i])

   if(counter<=K):
      goal_max=goal

   else:
      goal_min=goal
      
print(goal_max)

Buggy submission (verdict: Runtime Error):
N,K=input().split()
A=list(map(int,input().split()))
F=list(map(int,input().split()))

A=sorted(A)
F=sorted(F,reverse=True)
time=list()

for i in range(N):
   time.append(A[i]*F[i])

while(K>0):
   cmax=max(time)
   if(cmax>0):
      A[time.index(cmax)]-=1
      time[time.index(cmax)]=A[time.index(cmax)]*F[time.index(cmax)]
      K-=1
   elif(cmax=0):
      break

cmax=max(time)
print(cmax)
Problem p03061 (python)

Fixed submission:
from sys import stdin
from fractions import gcd
def main():
    #入力
    readline=stdin.readline
    N=int(readline())
    A=list(map(int,readline().split()))
    A.insert(0,0)
    A.append(0)

    L=[0]*N
    R=[0]*N
    for i in range(1,N):
        L[i]=gcd(L[i-1],A[i])
    for i in range(N-2,-1,-1):
        R[i]=gcd(R[i+1],A[i+2])

    res=0
    for i in range(N):
        res=max(res,gcd(L[i],R[i]))
    print(res)

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
from math import gcd
def main():
    #入力
    readline=stdin.readline
    N=int(readline())
    A=list(map(int,readline().split()))
    A.insert(0,0)
    A.append(0)

    L=[0]*N
    R=[0]*N
    for i in range(1,N):
        L[i]=gcd(L[i-1],A[i])
    for i in range(N-2,-1,-1):
        R[i]=gcd(R[i+1],A[i+2])

    res=0
    for i in range(N):
        res=max(res,gcd(L[i],R[i]))
    print(res)

if __name__=="__main__":
    main()
Problem p03078 (python)

Fixed submission:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    x,y,z,k=map(int,readline().split())
    a=list(map(int,readline().split()))
    b=list(map(int,readline().split()))
    c=list(map(int,readline().split()))

    d=list()
    for i in range(x):
        for j in range(y):
            d.append(a[i]+b[j])

    d.sort(reverse=True)
    if x*y>=k:
        d=d[:k]

    e=list()
    for i in range(len(d)):
        for j in range(z):
            e.append(d[i]+c[j])

    e.sort(reverse=True)
    for i in range(k):
        print(e[i])

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
import heapq
def main():
    #入力
    readline=stdin.readline
    x,y,z,k=map(int,readline().split())
    a=list(map(int,readline().split()))
    a.sort(reverse=True)
    b=list(map(int,readline().split()))
    b.sort(reverse=True)
    c=list(map(int,readline().split()))
    c.sort(reverse=True)

    s={(0,0,0)}
    h=[[-(a[0]+b[0]+c[0]),(0,0,0)]]
    heapq.heapify(h)
    for _ in range(k):
        li=heapq.heappop(h)
        n=-li[0]
        co=li[1]
        print(n)

        if co[0]+1<x:
            co_1=(co[0]+1,co[1],co[2])
            n_1=a[co_1[0]]+b[co_1[1]]+c[co_1[2]]
            n_1=-n_1
        if co[1]+1<y:
            co_2=(co[0],co[1]+1,co[2])
            n_2=a[co_2[0]]+b[co_2[1]]+c[co_2[2]]
            n_2=-n_2
        if co[2]+1<z:
            co_3=(co[0],co[1],co[2]+1)
            n_3=a[co_3[0]]+b[co_3[1]]+c[co_3[2]]
            n_3=-n_3

        if co_1 not in s:
            heapq.heappush(h,[n_1,co_1])
            s.add(co_1)
        if co_2 not in s:
            heapq.heappush(h,[n_2,co_2])
            s.add(co_2)
        if co_3 not in s:
            heapq.heappush(h,[n_3,co_3])
            s.add(co_3)

if __name__=="__main__":
    main()
Problem p03110 (python)

Fixed submission:
def main():
    N=int(input())
    X=[]
    U=[]
    for i in range(N):
        x,u=input().split()
        x=float(x)
        X.append(x)
        U.append(u)

    count=0
    for i in range(N):
        if U[i]=="JPY":
            count+=X[i]
        else:
            count+=380000*X[i]
    print(count)
if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N=int(input())
    X=[]
    U=[]
    for i in range(N):
        x,u=input().split()
        x=int(x)
        X.append(x)
        U.append(u)

    count=0
    for i in range(N):
        if U[i]=="JPY":
            count+=X[i]
        else:
            count+=380000*X[i]
    print(count)
if __name__=="__main__":
    main()
Problem p03287 (python)

Fixed submission:
from sys import stdin
from itertools import accumulate
def main():
    #入力
    readline=stdin.readline
    n,m=map(int,readline().split())
    a=list(map(int,readline().split()))

    d=dict()
    for s in accumulate(a):
        x=s%m
        if x not in d:
            d[x]=1
        else:
            d[x]+=1

    if 0 in d:
        ans=d[0]
    else:
        ans=0
    for v in d.values():
        ans+=v*(v-1)//2

    print(ans)

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
from itertools import accumulate
def main():
    #入力
    readline=stdin.readline
    n,m=map(int,readline().split())
    a=list(map(int,readline().split()))

    d=dict()
    for s in accumulate(a):
        x=s%m
        if x not in d:
            d[x]=1
        else:
            d[x]+=1

    ans=d[0]
    for v in d.values():
        ans+=v*(v-1)//2

    print(ans)

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
from itertools import accumulate
def main():
    #入力
    readline=stdin.readline
    n,m=map(int,readline().split())
    a=list(map(int,readline().split()))

    d=dict()
    for s in accumulate(a):
        x=s%m
        if x not in d:
            d[x]=1
        else:
            d[x]+=1

    ans=d[0]
    for v in d.values():
        ans+=v*(v-1)//2

    print(ans)

if __name__=="__main__":
    main()
Problem p03471 (python)

Fixed submission:
from sys import stdin
def main():
    readline=stdin.readline
    N,Y=map(int,readline().split())

    flag=False
    for i in range(N+1):
        for j in range(N+1):
            m=10000*i+5000*j
            if m>Y:
                break
            else:
                k=(Y-m)//1000
                m+=1000*k
                if i+j+k==N:
                    print(i,j,k)
                    flag=True
                    break
        if flag:
            break
    if flag==False:
        print(-1,-1,-1)

if __name__=="__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    #入力
    readline=stdin.readline
    n,y=map(int,readline().split())

    flag=False
    for i in range(0,n+1):
        for j in range(0,n+1):
            if n<i+j: continue
            k=n-i-j
            if 10000*i+5000*j+1000*k==y:
                print(i,j,k)
                flag=True
                break
        if flag: break

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

if __name__=="__main__":
    main()
Problem p02612 (python)

Fixed submission:
from collections import deque
import math
import os
import random
import re
import sys
#n=list(map(int, input().split()))
#n=map(int, input().split())

def main():
	n=int(input())
	change = n%1000
	if change:
		print(1000-change)
	else:
		print(0)
		
	
main()

'''
if __name__ == '__main__':
    main()
'''

Buggy submission (verdict: Runtime Error):
def main():
	N=input()
	if N[1] != '0':
		print(100)
	else:
		print(0)
main()

Buggy submission (verdict: Runtime Error):
n=int(input())
if n[1]!='0':
  print(100)
else:
  print(0)

Buggy submission (verdict: Runtime Error):



din=input()
if din[1] != '0':
	print(100)
else:
	print(0)

Buggy submission (verdict: Runtime Error):
from collections import deque
import math
import os
import random
import re
import sys
#n=list(map(int, input().split()))
#n=map(int, input().split())

def main():
	din=input()
	if din[1] != '0':
		print('100')
	else:
		print('0')
main()

'''
if __name__ == '__main__':
    main()
'''

Buggy submission (verdict: Runtime Error):
from collections import deque
import math
import os
import random
import re
import sys
#n=list(map(int, input().split()))
#n=map(int, input().split())

def main():
	din=input()
	idx=[]
	if din[1] == '9':
		print(100)
	else:
		print(0)
main()

'''
if __name__ == '__main__':
    main()
'''
Problem p02613 (python)

Fixed submission:
s = input().split()
n=int(s[0])
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = input().split()
    d[s[0]]+=1
for i in d:
    print(i,' x ',d[i])

Buggy submission (verdict: Runtime Error):
from collections import deque
import math
import os
import random
import re
import sys
#n=list(map(int, input().split()))
#n=map(int, input().split())


def main():
	s = input().split()
    n=int(s[0])
    d = {'AC':0,'WA':0,'TLE':0,'RE':0}
    for i in range(n):
        s = input().split()
        d[s[0]]+=1
    for i in d:
        print(i,' x ',d[i])
main()
'''
if __name__ == '__main__':
    main()
'''
Problem p02617 (python)

Fixed submission:
#f problem
import math
import re
import os
import sys
N = int(input())
X = [0] * N
ans = 0
for i in range(N-1):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    #take +1 if...
    if x > y: x, y = y, x
    ans += (y - x) * (N - y + x + 1)
    X[x] += 1
    X[y] += 1
    #the pivot off
for i, x in enumerate(X):
    ans += (i + 1) * (N - i) * (2 - x)
print(ans // 2)#//2 -1 possible.  # solution master

Buggy submission (verdict: Runtime Error):
	#f
N = int(input())
X = [0] * N
ans = 0
for i in range(N-1):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    if x > y: x, y = y, x
    ans += (y - x) * (N - y + x + 1)
    X[x] += 1
    X[y] += 1
for i, x in enumerate(X):
    ans += (i + 1) * (N - i) * (2 - x)
print(ans // 2)0
Problem p02606 (python)

Fixed submission:
l, r, d = map(int, input().split(" "))

ans = 0
for i in range(l, r+1):
    if i % d == 0:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())

for n in range(1, N+1):
    ans = 0
    for x in range(1, 15):
        for y in range(x, 20):
            for z in range(y, 35):
                f = x**2 + y**2 + z**2 + x*y + x*z + y*z
                if f == n:
                    if x == y == z:
                        ans = 1
                    elif (x == y) or (y == z):
                        ans = 3
                    else:
                        ans = 6
    print(ans)