Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[]
L=[]
for _ in range(n):
  s=input()
  l.append(s)
import collections
c = collections.Counter(l)

for i in range(n):
  L.append(c.most_common()[i][0])
  if i!=n-1:
    if c.most_common()[i][1] != c.most_common()[i+1][1]:
      break
L.sort()
L=' '.join(L)
print(L)

Fixed submission:
import collections
n = int(input())
s = []
for _ in range(n):
    s.append(input())

c = collections.Counter(s)
m = c.most_common()[0]

ans = []
for _c in c.items():
    if _c[1] == m[1]:
        ans.append(_c[0])

for v in sorted(ans):
    print(v)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

A=[]
B=[]
for i in range(n):
  s=input()
  if s not in B:
    A.append([1,s])
    B.append(s)
  else:
    A[B.index(s)][0] += 1
A=sorted(A,reverse=True)
A.sort(key=lambda x:(x[0], x[1]), reverse=True)

C=[]
for i in range(len(A)):
  C.append(A[i][1])
  if i == len(A)-1:
    break
  if A[i][0] != A[i+1][0]:
    break
C.sort()
for i in range(len(C)):
  print(C[i])


Fixed submission:
import collections
n = int(input())
s = []
for _ in range(n):
    s.append(input())

c = collections.Counter(s)
m = c.most_common()[0]

ans = []
for _c in c.items():
    if _c[1] == m[1]:
        ans.append(_c[0])

for v in sorted(ans):
    print(v)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

A=[]
B=[]
for i in range(n):
  s=input()
  if s not in B:
    A.append([1,s])
    B.append(s)
  else:
    A[B.index(s)][0] += 1
A=sorted(A,reverse=True)
A.sort(key=lambda x:(x[0], x[1]), reverse=True)

C=[]
for i in range(len(A)):
  C.append(A[i][1])
  if i == len(A)-1:
    break
  if A[i][0] != A[i+1][0]:
    break
C.sort()
for i in range(len(C)):
  print(C[i])


Fixed submission:
import collections
n = int(input())
s = []
for _ in range(n):
    s.append(input())

c = collections.Counter(s)
m = c.most_common()[0]

ans = []
for _c in c.items():
    if _c[1] == m[1]:
        ans.append(_c[0])

for v in sorted(ans):
    print(v)
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
if a+b>x:
  print(0)
  exit()
k=(x-b)//a+1

while k>0:
  n=a*k+len(str(k))*b

  if n<=x:
    if n>10**9:
      print(10**9)
      exit()
    print(k)
    exit()
  k-=1


Fixed submission:
s = input()
if s=="SUN":
  print(7)
elif s=="MON":
  print(6)
elif s=="TUE":
  print(5)
elif s=="WED":
  print(4)
elif s=="THU":
  print(3)
elif s=="FRI":
  print(2)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
import math
x,y = map(int,input().split())
mod = 10**9+7

if (2*x-y)%3 != 0 or (-x+2*y)%3 != 0 or y>2*x or x>2*y:
  print(0)
  exit()
  
a = ((2*x-y)//3)%mod
b = ((-x+2*y)//3)%mod


def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

print(cmb(a+b,a)%mod)


Fixed submission:
r = int(input())

print(r*r)
Buggy python submission (verdict: Runtime Error):
import math

n = int(input())

k = math.floor(math.sqrt(n))

for i in reversed(range(k)):
  if n/i == n//i:
    print(int(n/i + i -2))
    exit()
    

Fixed submission:
import math

n = int(input())

k = math.ceil(math.sqrt(n))

for i in reversed(range(k+1)):
  if n/i == n//i:
    print(int(n/i + i -2))
    exit()
Buggy python submission (verdict: Runtime Error):
s = input()

if s = "Rainy":
  print("Sunny")
elif s = "Sunny":
  print("Cloudy")
else:
  print("Rainy")

Fixed submission:
s = input()

if s == "Rainy":
  print("Sunny")
elif s == "Sunny":
  print("Cloudy")
else:
  print("Rainy")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
sum = 0
for i in range (n):
  sum += i
print(sum)
  

Fixed submission:
n = int(input())

print(n*(n-1)//2)
Buggy python submission (verdict: Runtime Error):
n=int(input())

L=list(map(int,sorted(input().split())))

L=sorted(L)
from scipy.speial import comb
k=1
sum=0
for i in range(n-1):
  if L[i]==L[i+1]:
    k += 1
  else:
    if k==1:
      sum +=1
    else:
      sum += comb(k,2,exact=True)
    k=1
if k==1:
  sum += 1
else:
  sum += comb(k,2,exact=True)
print(sum)



Fixed submission:
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n=int(input())
L = []
for i in range(n):
  a = input()
  a = sorted(a)
  L.append(a)
L = sorted(L)


k=1
sum=0
for i in range(n-1):
  if L[i]==L[i+1]:
    k += 1
  else:
    if k!=1:
      sum += cmb(k,2)
    k=1
if k!=1:
  sum += cmb(k,2)
print(sum)
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
if (a+b)%2 == 0:
  print((a+b)//2)
else:
  print(IMPOSSIBLE)

Fixed submission:
a,b = map(int,input().split())
if (a+b)%2 == 0:
  print((a+b)//2)
else:
  print("IMPOSSIBLE")
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int main()
{
  int N;
  cin >> N;
  int count= 0;
  
  vector<int> p(N);
  for (int i=1 ;i < N ;i++) {
    cin >> p[i];
    if (p[i-1]+1 != p[i]) {
      count++;
      }
    }
  
  if (count == 0 || count ==2){
    cout << "YES" << endl;
  }
  else cout << "NO" << endl;
}


Fixed submission:
n = int(input())
li = list(map(int,input().split()))
count = 0
for i in range(n):
  if(li[i] != i+1):
    count += 1
if(count == 0 or count == 2):
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int main()
{
  int N;
  cin >> N;
  int count= 0;
  
  vector<int> p(N);
  for (int i=1 ;i < N ;i++) {
    cin >> p[i];
    if (p[i-1]+1 != p[i+1]) {
      count++;
      }
    }
  
  if (count == 0 || count ==2){
    cout << "YES" << endl;
  }
  else cout << "NO" << endl;
}


Fixed submission:
n = int(input())
li = list(map(int,input().split()))
count = 0
for i in range(n):
  if(li[i] != i+1):
    count += 1
if(count == 0 or count == 2):
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input())
li = list(map(int,input()))
count = 0
for i in range(n):
  if(li[i] != i+1):
    count += 1
if(count == 0 or count == 2):
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())
li = list(map(int,input().split()))
count = 0
for i in range(n):
  if(li[i] != i+1):
    count += 1
if(count == 0 or count == 2):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
s = int(input())
ptn = []
count = 0
while True:
  ptn.append(s)
  if s%2 == 0:
    s /=2
  else:
    s = 3*x+1
  if s in ptn:
    print(count+1)
    break
  count +=1


Fixed submission:
s = int(input())
ptn = []
count = 1
while True:
  ptn.append(s)
  if s%2 == 0:
    s /=2
  else:
    s = 3*s+1
  if s in ptn:
    print(count+1)
    exit()
  count +=1

Buggy python submission (verdict: Runtime Error):
s = int(input())
count = 0
for i in range(1000000):
  if s%2 == 0:
    s /=2
  else:
    s = 3*x+1
  
  if s==4:
    print(count+4)
  count +=1

Fixed submission:
s = int(input())
ptn = []
count = 1
while True:
  ptn.append(s)
  if s%2 == 0:
    s /=2
  else:
    s = 3*s+1
  if s in ptn:
    print(count+1)
    exit()
  count +=1

Buggy python submission (verdict: Runtime Error):
s = int(input())
count = 0
for i in range(1000000):
  if x%2 == 0:
    x /=2
  else:
    x = 3*x+1
  
  if x==4:
    print(count+4)
  count +=1

Fixed submission:
s = int(input())
ptn = []
count = 1
while True:
  ptn.append(s)
  if s%2 == 0:
    s /=2
  else:
    s = 3*s+1
  if s in ptn:
    print(count+1)
    exit()
  count +=1
Buggy python submission (verdict: Time Limit Exceeded):
def chmin(a,b):
  if a > b:
    return b
  else:
    return a

n,k = map(int,input().split())
A = list(map(int,input().split()))
f_inf = float('inf')
dp = [f_inf]*n
dp[0]=0
for i in range(n):
  for j in range(k+1):
    if i >= j:
      dp[i]=chmin(dp[i],dp[i-j]+abs(A[i]-A[i-j]))
print(dp[n-1])

Fixed submission:
def chmin(a,b):
  if a > b:
    return b
  else:
    return a

n,k = map(int,input().split())
A = list(map(int,input().split()))
f_inf = float('inf')
dp = [f_inf]*n
dp[0]=0
for i in range(n):
  for j in range(k+1):
    if i >= j:
      dp[i]=chmin(dp[i],dp[i-j]+abs(A[i]-A[i-j]))
print(dp[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
n,w = map(int,input().split())
weight = []
value = []
for i in range(n):
  a,b= map(int,input().split())
  weight.append(a)
  value.append(b)

dp = [[0]*(w+1) for i in range(n+1)]
for i in range(n):
  for j in range(w+1):
    if j - weight[i] >= 0:
      dp[i+1][j] = max(dp[i][j],dp[i][j-weight[i]] + value[i])
    else:
      dp[i+1][j] = dp[i][j]

print(dp[n][w])


Fixed submission:
n,w = map(int,input().split())
weight = []
value = []
for i in range(n):
  a,b= map(int,input().split())
  weight.append(a)
  value.append(b)

dp = [[0]*(w+1) for i in range(n+1)]
for i in range(n):
  for j in range(w+1):
    if j - weight[i] >= 0:
      dp[i+1][j] = max(dp[i][j],dp[i][j-weight[i]] + value[i])
    else:
      dp[i+1][j] = dp[i][j]

print(dp[n][w])
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = [int(input()) for _ in [0]*n]

print(sum(l)-max(l)//2)


Fixed submission:
d = int(input())
if d == 25:
  print('Christmas')
elif d == 24:
  print('Christmas Eve')
elif d == 23:
  print('Christmas Eve Eve')
else:
  print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
n = int(input())
li = input().split()
print(sum(li)-max(li)/2)

Fixed submission:
n = int(input())
l = [int(input()) for _ in [0]*n]

print(sum(l)-max(l)//2)

Buggy python submission (verdict: Runtime Error):
n = int(input())
maximum = 0
li = list(map(int,input().split()))
for i in range(n):
  if li[i] > maximum:
    maximum = li[i]
    s = i
  
sum = 0
for i in range(n):
  sum += li[i]
sum -= li[s]/2

print(sum)

Fixed submission:
n = int(input())
l = [int(input()) for _ in [0]*n]

print(sum(l)-max(l)//2)
Buggy python submission (verdict: Runtime Error):
n=input()
if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)


Fixed submission:
n=int(input())
if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)
Buggy python submission (verdict: Runtime Error):
n=int(input())
T=int(input())
minimum=10000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)
    


Fixed submission:
n,T = map(int,input().split())
minimum=10000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)

Buggy python submission (verdict: Runtime Error):
n=int(input())
T=int(input())
minimum=10000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
if minimum = 10000:
  print('TLE')
else:
  print(minimum)
    


Fixed submission:
n,T = map(int,input().split())
minimum=10000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)

Buggy python submission (verdict: Runtime Error):
n=int(input())
T=int(input())
minimum=1000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
print(minimum)
    


Fixed submission:
n,T = map(int,input().split())
minimum=10000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)

Buggy python submission (verdict: Runtime Error):
n=int(input())
T=int(input())
minimum=1000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minnimum = min(minimum,c)
print(minimum)
    


Fixed submission:
n,T = map(int,input().split())
minimum=10000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)
Buggy python submission (verdict: Runtime Error):
n=int(input())
for i in range(3):
  n[i] = 10-n[i]
print(n)

Fixed submission:
n=input()
n=n.replace('1','x')
n=n.replace('9','1')
n=n.replace('x','9')
print(n)

Buggy python submission (verdict: Runtime Error):
n=input()
for i in range(3):
  n[i] = 10-n[i]
print(n)

Fixed submission:
n=input()
n=n.replace('1','x')
n=n.replace('9','1')
n=n.replace('x','9')
print(n)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
    
n = int(input())
v = list(map(int, input().split()))

a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
print(a)
print(b)
a.append([0,0])
b.append([0,0])
if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1])
else:
  print(min(n-(a[0][1]+b[1][1]),n-(a[1][1]+b[0][1])))

Fixed submission:
from collections import Counter
    
n = int(input())
v = list(map(int, input().split()))

a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])
if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1]))
else:
  print(min(n-(a[0][1]+b[1][1]),n-(a[1][1]+b[0][1])))

Buggy python submission (verdict: Runtime Error):
from collections import Counter
    
n = int(input())
v = list(map(int, input().split()))

a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
print(a)
print(b)
a.append([0,0])
b.append([0,0])
if a[0][0] != b[0][0]:
  print(n-(a[0][0]+b[0][0])
else:
  print(min(n-(a[0][0]+b[1][0]),n-(a[1][0]+b[0][0])))

Fixed submission:
from collections import Counter
    
n = int(input())
v = list(map(int, input().split()))

a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])
if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1]))
else:
  print(min(n-(a[0][1]+b[1][1]),n-(a[1][1]+b[0][1])))
Buggy python submission (verdict: Runtime Error):
import collections
s=input()
t=input()
s = collections.Count(s)
t = collections.Count(t)
if sorted(s.values()) == sorted(t.values()):
  print("Yes")
else:
  print("No")

Fixed submission:
li=list(map(int,input().split()))
li.sort()
print(li[0]+li[1]+li[2]*10)

Buggy python submission (verdict: Runtime Error):
li = map(int(input().split()))
li.sort()
print(li[0]*10+li[1]+li[2])

Fixed submission:
li=list(map(int,input().split()))
li.sort()
print(li[0]+li[1]+li[2]*10)
Buggy python submission (verdict: Runtime Error):
n=input()
x=[]
for i in range(n):
  w = input()
  if i !=0 and (w in x or x[i-1][-1] != w[0]):
    print ("No")
    exit()
  x.append(w)
print("Yes")
    

Fixed submission:
n = int(input())
s  = input()
L = [s]
for i in range(n-1):
  t = input()
  if t[0] != s[len(s)-1] or t in L:
    print("No")
    exit()
  L.append(t)
  s = t
print("Yes")
Buggy python submission (verdict: Runtime Error):
import fractions

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

L = list(map(int,input().split()))


if n == 1:
  print(abs(L[0]-x))
else:
  L.append(x)
  L = sorted(L)
  a = L[1]-L[0]
  for i in range(n-2):
    b = L[i+2]-L[i+1]
    a = fractions.gcd(a,b)
print(a)


Fixed submission:
import fractions

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

L = list(map(int,input().split()))
y = []
for i in range(n):
  y.append(abs(L[i]-x))
tmp = y[0]

for i in range(n-1):
  tmp = fractions.gcd(tmp,y[i+1])
print(tmp)
Buggy python submission (verdict: Runtime Error):
n = int(input())

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

Fixed submission:
n = int(input())

e = n//2
o = n-e

print(e*o)

Buggy python submission (verdict: Runtime Error):
n = int(input())

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

Fixed submission:
n = int(input())

e = n//2
o = n-e

print(e*o)

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())

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

Fixed submission:
n = int(input())

e = n//2
o = n-e

print(e*o)
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input())

print(a-b+1)

Fixed submission:
a,b = map(int,input().split())

print(a-b+1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
li = list(n)
if sum(li)%n==0:
  print('Yes')
else:
  print('No')

Fixed submission:
n = input()
li = list(n)
li = [int(i) for i in li]

if int(n)%sum(li)==0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
import math

n,k = map(int,input().split())
li = [int(i) for i in input().split()]
a = li.index(4)
k -= 1
n -= 1
left = math.ceil(a/k)
right = math.ceil((n-a)/k)
print(left+right)

Fixed submission:
import math

n,k = map(int,input().split())

print(math.ceil((n-1)/(k-1)))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

n=b-a

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

Fixed submission:
a,b=map(int,input().split())

n=b-a

print(n*(n+1)//2-b)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

print(max(a+b,a-b,a*b))

Fixed submission:
a,b = map(int,input().split())

print(max(a+b,a-b,a*b))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

if b => a:
  print(a)
else:
  print(a-1)

Fixed submission:
a,b = map(int,input().split())

if a <= b:
  print(a)
  
else:
  print(a-1)
Buggy python submission (verdict: Runtime Error):
s=int(input())
ans = 0
if s[0]=="o":
  ans += 1

if s[1]=="o":
  ans += 1

if s[2]=="o":
  ans += 1

print(700+100*ans)

Fixed submission:
s = input()
ans = 0
if s[0]=="o":
  ans += 1

if s[1]=="o":
  ans += 1

if s[2]=="o":
  ans += 1

print(700+100*ans)

Buggy python submission (verdict: Runtime Error):
s=int(input())
ans = 0
if s[0]==o:
  ans += 1

if s[1]==o:
  ans += 1

if s[2]==o:
  ans += 1

print(700+100*ans)

Fixed submission:
s = input()
ans = 0
if s[0]=="o":
  ans += 1

if s[1]=="o":
  ans += 1

if s[2]=="o":
  ans += 1

print(700+100*ans)
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())

print(min(a,b)+min(c,d))

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())


print(min(a,b)+min(c,d))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

if (a%500) <= b:
  print("Yes")
else:
  print("No")


Fixed submission:
a = int(input())
b = int(input())

if (a%500) <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

if (a%500) <= b:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())

if (a%500) <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a,b = map(input().split())

if (a%500) <= b:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())

if (a%500) <= b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
x=int(input())
cnt = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k == x:
        cnt +=1
print(cnt)


Fixed submission:
x = int(input())
a = int(input())
b = int(input())

print((x-a)%b)
Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
cnt = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a+100*b+50*c == x:
        cnt +=1
print(cnt)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
cnt = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k == x:
        cnt +=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a%2!=0 && b%2!=0:
  print('Odd')
else:
  print('Even')

Fixed submission:
a,b=map(int,input().split())
if a%2!=0 and b%2!=0:
  print('Odd')
else:
  print('Even')
Buggy python submission (verdict: Runtime Error):
s = input()
print(s.replace('2017','2018')

Fixed submission:
s = input()
print(s.replace('2017','2018'))

Buggy python submission (verdict: Runtime Error):
y,m,d = int(input().split("/"))

print(2018+"/"+m+"/"+d)

Fixed submission:
s = input()
print(s.replace('2017','2018'))
Buggy python submission (verdict: Runtime Error):
s=input()
ans = 0
for i in range(slen()):
  if s[i] == 1:
    ans +=1
print(ans)
    

Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
s=input()
ans = 0
for i in range(s.len()):
  if s[i] == 1:
    ans +=1
print(ans)
    

Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
import collections

c = collections.Counter(A)
c = c.most_common()
while len(c) > k:
    sum += c[-1][1]
    c = c[:-1]
print(sum)

Fixed submission:
import sys
import collections
input = sys.stdin.readline
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
c = collections.Counter(A)
c = c.most_common()
if len(c) > k:
  a = len(c)-k
  c = c[-a:]
  for i in range(a):
    sum += c[i][1]
  print(sum)
else:
  print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
import collections

c = collections.Counter(A)
c = c.most_common()
while len(c) > k:
    sum += c[-1][1]
    c = c[:-1]
print(sum)

Fixed submission:
import sys
import collections
input = sys.stdin.readline
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
c = collections.Counter(A)
c = c.most_common()
if len(c) > k:
  a = len(c)-k
  c = c[-a:]
  for i in range(a):
    sum += c[i][1]
  print(sum)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
import collections

c = collections.Counter(A)
c = c.most_common()
for i in range(n):
  if len(c) > k:
    sum += c[-1][1]
    c = c[:-1]
  else:
    break
print(sum)

Fixed submission:
import sys
import collections
input = sys.stdin.readline
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
c = collections.Counter(A)
c = c.most_common()
if len(c) > k:
  a = len(c)-k
  c = c[-a:]
  for i in range(a):
    sum += c[i][1]
  print(sum)
else:
  print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
import collections

c = collections.Counter(A)
c = c.most_common()
for i in range(n):
  if len(c) > k:
    sum += c[-1][1]
    c = c[:-1]
  else:
    break
print(sum)

Fixed submission:
import sys
import collections
input = sys.stdin.readline
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
c = collections.Counter(A)
c = c.most_common()
if len(c) > k:
  a = len(c)-k
  c = c[-a:]
  for i in range(a):
    sum += c[i][1]
  print(sum)
else:
  print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
import collections

c = collections.Counter(A)
c = c.most_common()
for i in range(n):
  if len(c) > k:
    sum += c[-1][1]
    c = c[:-1]
  else:
    break
print(sum)

Fixed submission:
import sys
import collections
input = sys.stdin.readline
n,k = map(int,input().split())

A = list(map(int,input().split()))
sum = 0
c = collections.Counter(A)
c = c.most_common()
if len(c) > k:
  a = len(c)-k
  c = c[-a:]
  for i in range(a):
    sum += c[i][1]
  print(sum)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
a,b=map(input().split())

if a<b:
  print("<")
elif a>b:
  print(">")
else:
  print("=")


Fixed submission:
a,b=input().split()

if a<b:
  print("<")
elif a>b:
  print(">")
else:
  print("=")