ZhenlongDai/ACPR huggingface dataset:
Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
[N,M]=list(map(int,input().split()
              )
          )
XYZ=[[int(i) for i in input().split()] for i in range(N)] 
maxabs=0

for i in range(8):
  pm=list(map(int,format(i, 'b')))
  pm=[0,]*(3-len(pm))+pm

  newXYZ=sorted([[item[0]*(-1)**pm[0],item[1]*(-1)**pm[1],item[2]*(-1)**pm[2]] for item in XYZ],
               reverse=True)
  
  maxabs=max(sum([abs(sum([newXYZ[m][j] for m in range(M)]
                             )
                         ) for j in range(3)
                 ]
                ),
             maxabs
            )


print(maxabs)

Failing test case input:
10 8
1 -80 10
17 12 1
-94 45 1
-1 -1 7
-57 60 162
-12 -79 -24
-26 0 3
42 30 -14
26 -236 103
-202 18 82

Expected output:
982


Actual output:
641


Fixed submission (verdict: Accepted):
[N,M]=list(map(int,input().split()
              )
          )
XYZ=[[int(i) for i in input().split()] for i in range(N)] 
maxabs=0

for i in range(8):
  pm=list(map(int,format(i, 'b')))
  pm=[0,]*(3-len(pm))+pm
  pm=[(-1)**item for item in pm]
  
  newXYZ=sorted([[item[0]*pm[0],item[1]*pm[1],item[2]*pm[2]] for item in XYZ],
                key=lambda x:sum(x),
                reverse=True)
  
  maxabs=max(sum([abs(sum([newXYZ[m][j] for m in range(M)]
                             )
                         ) for j in range(3)
                 ]
                ),
             maxabs
            )


print(maxabs)

Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())
c=[list(map(int,input().split())) for i in range(N)]

bit=[[] for i in range(2**3)]
for k in range(N):
    for i in range(2**3):
        t=c[k].copy()
        for j in range(3):
            if(i>>j&1):
                t[j]*=-1
        bit[i].append(t)
for i in range(2**3):
    bit[i].sort(key=lambda x:(x[0],x[1],x[2]),reverse=True)
res=0
for i in range(2**3):
    p=[1,1,1]
    for j in range(3):
        if(i>>j&1):
            p[j]*=-1
    z,o,t=0,0,0
    for k in range(M):
        z+=bit[i][k][0]*p[0]
        o+=bit[i][k][1]*p[1]
        t+=bit[i][k][2]*p[2]
    res=max(res,abs(z)+abs(o)+abs(t))
print(res)

Failing test case input:
10 5
13 -80 45
23 16 5
-94 28 2
-3 0 18
-69 72 128
-26 -86 -54
-69 -8 48
21 65 -25
25 -140 87
-62 18 82

Expected output:
690


Actual output:
550


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
c=[list(map(int,input().split())) for i in range(N)]

bit=[[] for i in range(2**3)]
for k in range(N):
    for i in range(2**3):
        t=c[k].copy()
        for j in range(3):
            if(i>>j&1):
                t[j]*=-1
        bit[i].append(t)
for i in range(2**3):
    bit[i].sort(key=lambda x:(x[0]+x[1]+x[2]),reverse=True)
res=0
for i in range(2**3):
    p=[1,1,1]
    for j in range(3):
        if(i>>j&1):
            p[j]*=-1
    z,o,t=0,0,0
    for k in range(M):
        z+=bit[i][k][0]*p[0]
        o+=bit[i][k][1]*p[1]
        t+=bit[i][k][2]*p[2]
    res=max(res,abs(z)+abs(o)+abs(t))
print(res)
Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
xyz = [list(map(int, input().split())) for i in range(N)]
tmp = [[0]*N for i in range(8)]

for n, _ in enumerate(xyz):
    x,y,z = _
    tmp[0][n] = x+y+z
    tmp[1][n] = x+y-z
    tmp[2][n] = x-y+z
    tmp[3][n] = x-y-z
    tmp[4][n] = -x+y+z
    tmp[5][n] = -x+y-z
    tmp[6][n] = -x-y+z
    tmp[7][n] = -x-y-z

result = [0]*8
for i in range(8):
    print(sorted(tmp[i]))
    result[i] = sum(sorted(tmp[i])[-M:])

print(max(result))

Failing test case input:
10 8
-1 -252 15
17 11 1
-94 45 1
0 0 8
-63 60 288
-19 -195 -24
-26 0 4
42 30 -34
26 -10 23
-300 18 82

Expected output:
1208


Actual output:
[-238, -238, -200, -48, -22, 8, 29, 38, 39, 285]
[-364, -291, -268, -190, -50, -30, -8, -7, 27, 106]
[-236, -138, -22, -22, 7, 8, 59, 152, 165, 266]
[-411, -400, -140, -30, -8, 5, 13, 46, 200, 236]
[-236, -200, -46, -13, -5, 8, 30, 140, 400, 411]
[-266, -165, -152, -59, -8, -7, 22, 22, 138, 236]
[-106, -27, 7, 8, 30, 50, 190, 268, 291, 364]
[-285, -39, -38, -29, -8, 22, 48, 200, 238, 238]
1208


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
xyz = [list(map(int, input().split())) for i in range(N)]
tmp = [[0]*N for i in range(8)]

for n, _ in enumerate(xyz):
    x,y,z = _
    tmp[0][n] = x+y+z
    tmp[1][n] = x+y-z
    tmp[2][n] = x-y+z
    tmp[3][n] = x-y-z
    tmp[4][n] = -x+y+z
    tmp[5][n] = -x+y-z
    tmp[6][n] = -x-y+z
    tmp[7][n] = -x-y-z

result = -float("inf")
for i in range(8):
    result = max(result, sum(sorted(tmp[i], reverse=True)[:M]))
print(result)

Problem: p03326
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m = map(int, input().split())
l = []
for i in range(n):
    x, y, z = map(int, input().split())
    l.append([x, y, z])
ans = 0
for i in range(8):
    a = bin(i)[2:].zfill(3)
    xi = 1 if a[0] == '1' else - 1
    yi = 1 if a[1] == '1' else - 1
    zi = 1 if a[2] == '1' else - 1
    l = sorted(l, key=lambda value: value[0] * xi + value[1] * yi + value[2] + zi, reverse=True)
    ans = max(ans, sum(j[0]*xi+j[1]*yi+j[2]*zi for j in l[:m]))
print(ans)



Failing test case input:
5 3
1 -2 3
-4 5 -6
7 -8 -16
-10 19 -12
13 -14 15

Expected output:
57


Actual output:
50


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
l = []
for i in range(n):
    x, y, z = map(int, input().split())
    l.append([x, y, z])
ans = 0
for i in range(8):
    a = bin(i)[2:].zfill(3)
    xi = 1 if a[0] == '1' else - 1
    yi = 1 if a[1] == '1' else - 1
    zi = 1 if a[2] == '1' else - 1
    l = sorted(l, key=lambda value: value[0] * xi + value[1] * yi + value[2] * zi, reverse=True)
    ans = max(ans, abs(sum(j[0] * xi for j in l[:m])) + abs(sum(j[1]*yi for j in l[:m])) +abs(sum(j[2]*zi for j in l[:m])))
print(ans)
Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
lis = [list(map(int, input().split())) for i in range(n)]

def arr_multiply( lis2):
    def inner(lis1):
        return sum([l1*l2 for l1, l2 in zip(lis1, lis2)])
    return inner

if m == 0:
    print(0)

max_score = 0
for a in (-1, 1):
    for b in (-1, 1):
        for c in (-1, 1):
            func = arr_multiply([a, b, c])
            score = sum(sorted(list(map(func, lis)))[-m:])
            if score > max_score:
                max_score = score
print(max_score)

Failing test case input:
10 0
-1 -252 15
33 11 1
-94 45 1
0 -1 8
-123 60 656
-17 -195 -24
-26 0 4
42 24 -34
26 -17 5
-6 18 82

Expected output:
0


Actual output:
0
1187


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
lis = [list(map(int, input().split())) for i in range(n)]

def arr_multiply( lis2):
    def inner(lis1):
        return sum([l1*l2 for l1, l2 in zip(lis1, lis2)])
    return inner

max_score = 0
if m == 0:
    print(0)
else:
    for a in (-1, 1):
        for b in (-1, 1):
            for c in (-1, 1):
                func = arr_multiply([a, b, c])
                score = sum(sorted(list(map(func, lis)))[-m:])
                if score > max_score:
                    max_score = score
    print(max_score)

Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())
xyz=[list(map(int,input().split())) for i in range(N)]
MAX=0
for index in [[1,1,1],[1,1,-1],[1,-1,1],[1,-1,-1],[-1,1,1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]]:
    LIST=sorted([sum([p[a]*index[a] for a in range(3)]) for p in xyz])[::-1]
    print(LIST)
    if sum(LIST[0:M])>MAX:
        MAX=sum(LIST[0:M])
print(MAX)

Failing test case input:
10 7
-1 -252 15
17 11 2
-94 45 1
0 -1 8
-63 60 656
-17 -195 -24
-26 0 4
42 24 -34
26 -17 5
-6 18 82

Expected output:
1274


Actual output:
[653, 94, 32, 30, 14, 7, -22, -48, -236, -238]
[100, 26, 4, -9, -30, -50, -70, -188, -268, -659]
[533, 266, 154, 58, 48, 9, 8, -16, -22, -138]
[236, 202, 52, 38, 4, -7, -30, -106, -140, -779]
[779, 140, 106, 30, 7, -4, -38, -52, -202, -236]
[138, 22, 16, -8, -9, -48, -58, -154, -266, -533]
[659, 268, 188, 70, 50, 30, 9, -4, -26, -100]
[238, 236, 48, 22, -7, -14, -30, -32, -94, -653]
1274


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
xyz=[list(map(int,input().split())) for i in range(N)]
MAX=0
for index in [[1,1,1],[1,1,-1],[1,-1,1],[1,-1,-1],[-1,1,1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]]:
    LIST=sorted([sum([p[a]*index[a] for a in range(3)]) for p in xyz])[::-1]
    if sum(LIST[0:M])>MAX:
        MAX=sum(LIST[0:M])
print(MAX)
Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import copy
n,m = map(int,input().split())


scores = list()
for i in range(n):
    score = list(map(int,input().split()))
    scores.append(score)

smax=None
for x in range(2):
    scores_=copy.deepcopy(scores)
    
    for i in range(n):
        scores_[i][0] = pow(-1,x)*scores[i][0]
    for y in range(2):
        for i in range(n):
            scores_[i][1] = pow(-1,x)*scores[i][1]
        for z in range(2):
            for i in range(n):
                scores_[i][2] = pow(-1,x)*scores[i][2]
        
            sumlist=list()
            for i in range(n):
                sumlist.append(sum(scores_[i]))
            sumlist.sort()
            tmp=0
            
            for eat in range(m):
                tmp+=sumlist[-1]
                sumlist.pop()
            if smax==None or tmp>smax:
                smax=tmp
print(smax)

Failing test case input:
10 8
0 -153 10
17 17 1
-94 45 1
-1 0 7
-63 60 165
-12 -118 -24
-26 0 3
42 30 -14
26 -236 81
-202 18 82

Expected output:
1081


Actual output:
558


Fixed submission (verdict: Accepted):
import copy
n,m = map(int,input().split())


scores = list()
for i in range(n):
    score = list(map(int,input().split()))
    scores.append(score)

smax=None
for x in range(2):
    scores_=copy.deepcopy(scores)
    
    for i in range(n):
        scores_[i][0] = pow(-1,x)*scores[i][0]
    for y in range(2):
        for i in range(n):
            scores_[i][1] = pow(-1,y)*scores[i][1]
        for z in range(2):
            for i in range(n):
                scores_[i][2] = pow(-1,z)*scores[i][2]
        
            sumlist=list()
            for i in range(n):
                sumlist.append(sum(scores_[i]))
            sumlist.sort()
            
            tmp=0
            for eat in range(m):
                tmp+=sumlist[-1]
                sumlist.pop()
            if smax==None or tmp>smax:
                smax=tmp
print(smax)
Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n, m = na()

zs = []
for i in range(n):
    zs.append(na())

ans = 0
for u in (-1, 1):
    for v in (-1, 1):
        for w in (-1, 1):
            vs = []
            for z in zs:
                vs.append(z[0]*u+z[1]*v+z[2]*w)
            vs.sort()
            ans = max(ans, sum(vs[-m:]))

print(ans)

Failing test case input:
10 0
-1 -252 15
33 11 1
-94 45 1
0 -1 8
-123 60 656
-17 -195 -24
-26 0 4
42 24 -34
26 -17 5
-6 18 82

Expected output:
0


Actual output:
1187


Fixed submission (verdict: Accepted):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n, m = na()

zs = []
for i in range(n):
    zs.append(na())

ans = 0
if m == 0:
    print(0)
else:
    for u in (-1, 1):
        for v in (-1, 1):
            for w in (-1, 1):
                vs = []
                for z in zs:
                    vs.append(z[0]*u+z[1]*v+z[2]*w)
                vs.sort()
                ans = max(ans, sum(vs[-m:]))

    print(ans)

Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import copy
n,m = map(int,input().split())


scores = list()
for i in range(n):
    score = list(map(int,input().split()))
    scores.append(score)

smax=None
for x in range(2):
    scores_=copy.deepcopy(scores)
    
    for i in range(n):
        scores_[i][0] = pow(-1,x)*scores[i][0]
    for y in range(2):
        for i in range(n):
            scores_[i][1] = pow(-1,x)*scores[i][1]
        for z in range(2):
            for i in range(n):
                scores_[i][2] = pow(-1,x)*scores[i][2]
        
            ssum=list()
            for i in range(n):
                ssum.append(sum(scores_[i]))
            ssum.sort()
            tmp=0
            
            for eat in range(m):
                tmp+=ssum[-1]
                ssum.pop()
            if smax==None or tmp>smax:
                smax=tmp
print(smax)

Failing test case input:
10 8
1 -80 11
10 12 6
-94 45 0
-1 -1 7
-57 118 162
-12 -79 -54
-26 2 6
42 30 -25
26 -140 99
-114 18 82

Expected output:
707


Actual output:
276


Fixed submission (verdict: Accepted):
import copy
n,m = map(int,input().split())


scores = list()
for i in range(n):
    score = list(map(int,input().split()))
    scores.append(score)

smax=None
for x in range(2):
    scores_=copy.deepcopy(scores)
    
    for i in range(n):
        scores_[i][0] = pow(-1,x)*scores[i][0]
    for y in range(2):
        for i in range(n):
            scores_[i][1] = pow(-1,y)*scores[i][1]
        for z in range(2):
            for i in range(n):
                scores_[i][2] = pow(-1,z)*scores[i][2]
        
            sumlist=list()
            for i in range(n):
                sumlist.append(sum(scores_[i]))
            sumlist.sort()
            
            tmp=0
            for eat in range(m):
                tmp+=sumlist[-1]
                sumlist.pop()
            if smax==None or tmp>smax:
                smax=tmp
print(smax)
Problem: p03326
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())
cakes=[]
for i in range(N):
  x,y,z=map(int,input().split())
  cakes.append([x,y,z])
score=[0]*8
score[0]=sum(sorted(map(lambda c: c[0]+c[1]+c[2], cakes))[-M:])
score[1]=sum(sorted(map(lambda c: c[0]+c[1]-c[2], cakes))[-M:])
score[2]=sum(sorted(map(lambda c: c[0]-c[1]+c[2], cakes))[-M:])
score[3]=sum(sorted(map(lambda c: c[0]-c[1]-c[2], cakes))[-M:])
score[4]=sum(sorted(map(lambda c:-c[0]+c[1]+c[2], cakes))[-M:])
score[5]=sum(sorted(map(lambda c:-c[0]+c[1]-c[2], cakes))[-M:])
score[6]=sum(sorted(map(lambda c:-c[0]-c[1]+c[2], cakes))[-M:])
score[7]=sum(sorted(map(lambda c:-c[0]-c[1]-c[2], cakes))[-M:])
print(max(score))


Failing test case input:
10 0
-1 -252 15
33 11 1
-94 45 1
0 -1 8
-123 60 656
-17 -195 -24
-26 0 4
42 24 -34
26 -17 5
-6 18 82

Expected output:
0


Actual output:
1187


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
cakes=[]
for i in range(N):
  x,y,z=map(int,input().split())
  cakes.append([x,y,z])
if M==0:
  print(0)
  quit()
score=[0]*8
score[0]=sum(sorted(map(lambda c: c[0]+c[1]+c[2], cakes))[-M:])
score[1]=sum(sorted(map(lambda c: c[0]+c[1]-c[2], cakes))[-M:])
score[2]=sum(sorted(map(lambda c: c[0]-c[1]+c[2], cakes))[-M:])
score[3]=sum(sorted(map(lambda c: c[0]-c[1]-c[2], cakes))[-M:])
score[4]=sum(sorted(map(lambda c:-c[0]+c[1]+c[2], cakes))[-M:])
score[5]=sum(sorted(map(lambda c:-c[0]+c[1]-c[2], cakes))[-M:])
score[6]=sum(sorted(map(lambda c:-c[0]-c[1]+c[2], cakes))[-M:])
score[7]=sum(sorted(map(lambda c:-c[0]-c[1]-c[2], cakes))[-M:])
print(max(score))
Problem: p03326
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,M = map(int,input().split())
xyz = [list(map(int,input().split())) for _ in range(N)]

ans = 0
state = [0,0,0]
for s in range(1<<3):
    for i in range(3):
        if s%2 == 1:
            state[i] = 1
        else:
            state[i] = 0
        s = s>>1
    
    
    totalList = [0] * N
    
    for k in range(N):
        t = 0
        for i in range(3):
            if state[i]:
                t -= xyz[k][i]
            else:
                t += xyz[k][i]
        totalList[k] = t
        
    totalList.sort(reverse = True)
    cur = sum(totalList[:M])
    ans = max(ans,cur)
    cur = sum(totalList[M:])
    ans = max(ans,cur)

print(ans)
    
    

Failing test case input:
10 0
-1 -252 15
33 11 1
-94 45 1
0 -1 8
-123 60 656
-17 -195 -24
-26 0 4
42 24 -34
26 -17 5
-6 18 82

Expected output:
0


Actual output:
1187


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
xyz = [list(map(int,input().split())) for _ in range(N)]

ans = 0
state = [0,0,0]
for s in range(1<<3):
    for i in range(3):
        if s%2 == 1:
            state[i] = 1
        else:
            state[i] = 0
        s = s>>1
    
    
    totalList = [0] * N
    
    for k in range(N):
        t = 0
        for i in range(3):
            if state[i]:
                t -= xyz[k][i]
            else:
                t += xyz[k][i]
        totalList[k] = t
        
    totalList.sort(reverse = True)
    cur = sum(totalList[:M])
    ans = max(ans,cur)
    cur = sum(totalList[N-M:])
    ans = max(ans,cur)

print(ans)
Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = input().split()
m = int(m)

votes = input().split()
votes = [int(i) for i in votes]
votes.sort(reverse=True)

total = sum(votes)

valid = True
for i in range(m):
    if votes[i] <= total/(4*m):
        valid = False
        break

if valid:
    print('yes')
else:
    print('no')

Failing test case input:
3 2
145 15 3

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
n, m = input().split()
m = int(m)

votes = input().split()
votes = [int(i) for i in votes]
votes.sort(reverse=True)

total = sum(votes)

valid = True
for i in range(m):
    if votes[i] < total/(4*m):
        valid = False
        break

if valid:
    print('Yes')
else:
    print('No')

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y= list(map(int, input().split()))
i = list(map(int, input().split()))
i.sort(reverse=True)
k=sum(i)
flag=0
for j in range(y):
    if i[j]>=k/(4*(j+1)):
        flag+=1
if flag>y:
    print("No")
else:
    print("Yes")
 

Failing test case input:
6 5
7 44 78 1766 1 345 67 1493 111 45 6 789

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
x,y= list(map(int, input().split()))
i = list(map(int, input().split()))
i.sort(reverse=True)
k=sum(i)
flag=0
if i[y-1]>=k/(4*y):
    print("Yes")
else:
    print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split())

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

qtd_votos = sum(votos)
minimo = qtd_votos

contador = 0
for i in votos:
    if i > minimo:
        contador += 1
if contador >= M:
    print("Yes")
else:
    print("No")


Failing test case input:
12 3
4 5 78 104 2 345 23 2462 123 45 3 789

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())

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

qtd_votos = sum(votos)

minimo = qtd_votos/(4*M)

votos.sort(reverse = True)

if votos[M-1] >= minimo:
    print("Yes")
else:
    print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]
 
ans = 1
for i in range(N):
    if (4*M*A[i] < sum_A):
        ans= ans*1
    else:
    	ans =ans*0
 
if (ans != 0):
    print('Yes')
else:
    print('No')

Failing test case input:
3 1
145 15 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]

ans = 0
for i in range(N):
    if (4*M*A[i] >= sum_A):
        ans+=1
    else:
    	ans+=0
    	
if (ans >= M):
    print('Yes')
else:
    print('No')
Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i1 = input()
i1 = i1.split()
types = int(i1[0])
select = int(i1[1])

i2 = input()
i2 = [int(n) for n in i2.split()]
i2.sort(reverse=True)

summary = sum(i2)
threshold = int(summary / (types * 4))

if i2[select-1] < threshold :
    print("No")
else:
    print("Yes")


Failing test case input:
12 5
4 44 78 1300 4 345 67 1061 123 45 6 789

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
i1 = input()
i1 = i1.split()
types = int(i1[0])
select = int(i1[1])

i2 = input()
i2 = [int(n) for n in i2.split()]
i2.sort(reverse=True)

summary = sum(i2)
threshold = summary / (select * 4)




if i2[select-1] < threshold :
    print("No")
else:
    print("Yes")

Problem: p02718
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):


import sys
input=sys.stdin.readline

def main():
    n,m=map(int,input().split())
    A=list(map(int,input().split()))
    cnt=0
    for i in range(n):
        if A[i]>=1/(4*m):
            cnt+=1
    if cnt>=m:
        print("Yes")
    else:
        print("No")
    
    
    
if __name__=="__main__":
    main()


Failing test case input:
3 2
380 30 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


import sys
input=sys.stdin.readline

def main():
    n,m=map(int,input().split())
    A=list(map(int,input().split()))
    cnt=0
    suma=sum(A)
    for i in range(n):
        if A[i]>=suma/(4*m):
            cnt+=1
    if cnt>=m:
        print("Yes")
    else:
        print("No")
    
    
    
if __name__=="__main__":
    main()

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

def solve(n,m,lst):
  min_vote = math.ceil(sum(lst)/4/m) - 1
  print(min_vote)
  print(sum(lst))
  return lst[m-1] > min_vote

if __name__ == "__main__":
  _n, _m = map(int, input().split())
  a_list = [int(i) for i in input().split()]
  a_list = sorted(a_list,reverse=True)
  if solve(_n,_m,a_list):
    print('Yes')
  else:
    print('No')


Failing test case input:
4 1
4 0 0 2

Expected output:
Yes


Actual output:
1
6
Yes


Fixed submission (verdict: Accepted):
import math

def solve(n,m,lst):
  min_vote = math.ceil(sum(lst)/4/m) - 1
  return lst[m-1] > min_vote

if __name__ == "__main__":
  _n, _m = map(int, input().split())
  a_list = [int(i) for i in input().split()]
  a_list = sorted(a_list,reverse=True)
  if solve(_n,_m,a_list):
    print('Yes')
  else:
    print('No')

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
(N, M) = [int(x) for x in input().split()]
line=[int(x) for x in input().split()]
cutoff=sum(line)/(4*M)
count=0
for i in line:
    if i>cutoff:
        count+=1
if count>M:
    print("Yes")
else:
    print("No")


Failing test case input:
3 1
53 16 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
(N, M) = [int(x) for x in input().split()]
line=[int(x) for x in input().split()]
cutoff=sum(line)/(4*M)
count=N
for i in line:
    if i<cutoff:
        count-=1
if count>=M:
    print("Yes")
else:
    print("No")
Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = []
vote = []
num = list(map(int,input().split()))
vote = list(map(int,input().split()))
N = num[0]
M = num[1]
j = 0
j /= 4*M
cnt = 0
for i in range(0,len(vote)-1):
    if  vote[i]>=j:
        cnt += 1
    else:
        pass
if M<=cnt:
    print("Yes")
else:
    print("No")


Failing test case input:
12 5
4 44 78 1300 4 345 67 1061 101 45 6 789

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
num = []
vote = []
num = list(map(int,input().split()))
vote = list(map(int,input().split()))
N = num[0]
M = num[1]
j = sum(vote)/(4*M)


cnt = 0
for i in vote:
    if  i>=j:
        cnt += 1
    else:
        pass

if M<=cnt:
    print("Yes")
else:
    print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = list(map(int, input().split()))
scores = list(map(int, input().split()))
at_least = sum(scores) 

if len([ s for s in scores if s > at_least]) >= M:
  print('Yes')
else:
  print('No')

Failing test case input:
4 1
5 4 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M = list(map(int, input().split()))
scores = list(map(int, input().split()))
at_least = sum(scores) / (4*M)

if len([ s for s in scores if s >= at_least]) >= M:
  print('Yes')
else:
  print('No')

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
a = list(map(int, input().split()))
print("Yes") if len([a[i] for i in range(m) if a[i] > sum(a) / 4 / m]) >= m else print("No")

Failing test case input:
12 3
4 56 78 104 2 345 23 1268 123 45 3 789

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
a = list(map(int, input().split()))
print("Yes") if len([a[i] for i in range(n) if a[i] >= sum(a) / 4 / m]) >= m else print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
NM = list(map(int, input().split()))
A = list(map(int, input().split()))

count = 0
sumA = sum(A)
board = sumA 





for i in range(len(A)):
    if A[i] > board:
        count += 1
    else:
        continue


if count >= NM[1]:
    print("Yes")
else:
    print("No")


Failing test case input:
3 2
44 18 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
NM = list(map(int, input().split()))
A = list(map(int, input().split()))

count = 0
sumA = sum(A)
board = sumA / (4*NM[1])





for i in range(len(A)):
    if float(A[i]) >= board:
        count += 1
    else:
        continue


if count >= NM[1]:
    print("Yes")
else:
    print("No")
Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
a = list(map(int, input().split()))

total = sum(a)

count = 0

valid = total / (4 * m)

for i in a:
    if i > valid:
        count += 1

if count > m:
    print('Yes')
else:
    print('No')


Failing test case input:
3 1
145 15 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
a = list(map(int, input().split()))

total = sum(a)

count = 0

valid = total / (4 * m)

for i in a:
    if i >= valid:
        count += 1

if count >= m:
    print('Yes')
else:
    print('No')

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N,M = map(int,input().split())
l = [int(i) for i in input().split()]
l.sort(reverse = True)
l_sum = sum(l)
d = 4*M / l_sum
d = int(d)
cnt = 0
 
for i in range(N):
    if l[i] > d:
        cnt += 1
    else:
        break
 
if cnt >= M:
    print("Yes")
else:
    print("No")     

Failing test case input:
3 2
380 19 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
N,M = map(int,input().split())
l = [int(i) for i in input().split()]
l.sort(reverse = True)
l_sum = sum(l)
d = (1/(4*M))*l_sum
cnt = 0
 
for i in range(N):
    if l[i] >= d:
        cnt += 1
    else:
        break
 
if cnt >= M:
    print("Yes")
else:
    print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
item = input().split()
item = [int(x) for x in item]

item.sort(reverse=True)

s = sum(item)
res = 0
for i in range(n):
  if item[i] > s / (4*m):
    res += 1
    if res >= m:
      print('Yes')
  else:
    print('No')

Failing test case input:
3 1
104 15 1

Expected output:
Yes


Actual output:
Yes
No
No


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
item = input().split()
item = [int(x) for x in item]

item.sort(reverse=True)

s = sum(item)
res = 0
for i in range(n):
  if item[i] >= s / (4*m):
    res += 1
    if res >= m:
      print('Yes')
      break
  else:
    print('No')
    break

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,a1 = input().split()
b = input().split()
sum = 0
for _ in b:
    sum += int(_)
if int(b[int(a1) - 1]) < sum/4:
    print("Yes")
else:
    print("No")


Failing test case input:
3 1
343 2 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m = input().split()
b = input().split()
sum = 0
for x in b:
    sum += int(x)
yy=0
for y in b:
    if int(y) >= sum/(4*int(m)):
        yy+=1
if yy < int(m):
    print("No")
else:
    print("Yes")
Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
A = list(map(int, input().split()))



cnt = 0
cnt1 = 0

for i in range(N):
    cnt = cnt + A[i]

for i in range(N):
    if A[i] / cnt > 1 / 4 / M:
        cnt1 = cnt1 + 1



if cnt1 > M:
    print('Yes')
else:
    print('No')


Failing test case input:
12 3
4 5 78 104 2 345 23 2462 123 45 3 789

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
A = list(map(int, input().split()))



cnt = 0
cnt1 = 0

for i in range(N):
    cnt = cnt + A[i]

for i in range(N):
    if A[i] / cnt >= 1 / 4 / M:
        cnt1 = cnt1 + 1



if cnt1 >= M:
    print('Yes')
else:
    print('No')

Problem: p02718
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m = map(int, input().split())
arr = list(map(int, input().split()))
temp = sum(arr)
arr.sort()
arr = arr[::-1]
cnt = 0
for i in range(n):
    if arr[i] >= temp:
        cnt += 1
if cnt >= m:
    print("Yes")
    exit()
print("No")

Failing test case input:
3 2
25 22 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
arr = list(map(int, input().split()))
temp = sum(arr)/(4 * m)
cnt = 0
for i in range(n):
    if arr[i] >= temp:
        cnt += 1
if cnt >= m:
    print("Yes")
    exit()
print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N , M = input().split()
array = input().split()
flag = 0

N = int(N)
M = int(M)

iarray = []

for i in array:
    iarray.append(int(i))

total = sum(iarray)

for i in iarray:
    if i >= total/(4*M):
        flag += 1
if flag >= M:
    print("yes")
else:
    print("no")

Failing test case input:
12 3
4 56 78 104 2 345 67 1145 123 45 3 789

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
N , M = input().split()
array = input().split()
flag = 0

N = int(N)
M = int(M)

iarray = []

for i in array:
    iarray.append(int(i))

total = sum(iarray)

for i in iarray:
    if i >= total/(4*M):
        flag += 1
if flag >= M:
    print("Yes")
else:
    print("No")

Problem: p02718
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split())
arr = list(map(int,input().split()))

res = 0
for i in range(N):
    if i < (1/(4*M)*sum(arr)):
        res = res
    else:
        res += 1
if res >= M:
    print('Yes')
else:
    print('No')

Failing test case input:
12 3
4 56 78 97 2 345 67 890 123 45 3 789

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
arr = list(map(int,input().split()))

res = 0
for i in range(N):
    if arr[i] < (1/(4*M)*sum(arr)):
        res = res
    else:
        res += 1

if res >= M:
    print('Yes')
else:
    print('No')
Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
r = 1
w = 10**9 + 7
for i in range(1, n+1):
  if r > w:
    r = (r % w) * i
  else:
    r *= i
  
  
print(r)

Failing test case input:
100110

Expected output:
97369367


Actual output:
49469097715650


Fixed submission (verdict: Accepted):
n = int(input())
r = 1
w = 10**9 + 7
for i in range(1, n+1):    
  r *= i
  r = (r % w)
  
  
  
print(r)

Problem: p03796
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

ans = 1

for i in range(n):
    ans *= i+1
    ans = ans%10000007

Failing test case input:
110010

Expected output:
893005454


Actual output:
no output


Fixed submission (verdict: Accepted):

n = int(input())

ans = 1

for i in range(n):
    ans *= i+1
    ans = ans%(10**9+7)
    
print(ans)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = 1
dummy1,dummy2 = divmod(n,2)
for i in range(1,dummy1+1):
  ans *= i
  ans *= n+1-i
  ans = ans % (10**9+7)
if dummy2 == 1:
  ans *= (dummy2+1)
print(ans)



Failing test case input:
101101

Expected output:
511008164


Actual output:
1683785140


Fixed submission (verdict: Accepted):
n = int(input())
ans = 1
dummy1,dummy2 = divmod(n,2)
for i in range(1,dummy1+1):
  ans *= i
  ans *= n+1-i
  ans = ans % (10**9+7)
if dummy2 == 1:
  ans = ((dummy1+1)*ans % (10**9+7))
print(ans)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = 1
for i in range(1,n):
  ans *= i
  ans %= 10**9 + 7
print(ans)

Failing test case input:
110010

Expected output:
893005454


Actual output:
234059569


Fixed submission (verdict: Accepted):
n = int(input())
ans = 1
for i in range(1,n+1):
  ans *= i
  ans %= (10**9 + 7)
print(ans)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
temp = 1
     
for i in range(1,n+1):
  temp = temp * i
  temp = temp % (10**10)
     
print(temp % (10 ** 9 + 7))


Failing test case input:
110110

Expected output:
887588411


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
temp = 1
     
for i in range(1,n+1):
  temp = temp * i
  temp = temp % ((10**9)+7)
     
print(temp % (10 ** 9 + 7))

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

M = 10**9 + 7
N = int(sys.stdin.readline().strip())

x = 1

for i in range(N):
    x = (x * i) % M

print(x)


Failing test case input:
110010

Expected output:
893005454


Actual output:
0


Fixed submission (verdict: Accepted):
import sys

M = 10**9 + 7
N = int(sys.stdin.readline().strip())

x = 1

for i in range(1, N+1):
    x = (x * i) % M

print(x)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

ans = 1
for i in range(1,N+1):
    ans = (ans%(1000000007)) * i

print(ans)


Failing test case input:
101000

Expected output:
810232079


Actual output:
88703810853000


Fixed submission (verdict: Accepted):
N = int(input())

ans = 1
for i in range(1,N+1):
    ans = ((ans%(1000000007)) * i) % 1000000007

print(ans)
Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

res = 1

for i in range(1, n):
  res = res*i%(10**9+7)

print(res)

Failing test case input:
111010

Expected output:
521433597


Actual output:
18102166


Fixed submission (verdict: Accepted):
n = int(input())

res = 1

for i in range(1, n+1):
  res = res*i%(10**9+7)

print(res)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
for i in range(n):
  n=(n*(i+1))%(10**9+7)
print(n)

Failing test case input:
110110

Expected output:
887588411


Actual output:
359251086


Fixed submission (verdict: Accepted):
n=int(input())
p=1
for i in range(1,n+1):
  p=(p*i)%(10**9+7)
print(p)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
p = 1
mod  = int(10e9+7)
for i in range(1,n+1):
    p *=i
    p = p%mod
print(p)

Failing test case input:
101100

Expected output:
650720680


Actual output:
9193462480


Fixed submission (verdict: Accepted):
n = int(input())
p = 1
mod  = int(1e9+7)
for i in range(1,n+1):
    p *=i
    p = p%mod
print(p)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
p=1
for i in range(1,n+1):
    p=p*i
    p=p%(10**9+7)

Failing test case input:
193

Expected output:
98399701


Actual output:
no output


Fixed submission (verdict: Accepted):
n=int(input())
p=1
for i in range(1,n+1):
    p=p*i
    p=p%(10**9+7)
print(p)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
mod=1000000007

def P(x):
    ans=1
    for i in range(x):
        ans=ans*(i+1)%mod
    
    return(ans)

n=int(input())

print(n)

Failing test case input:
100000

Expected output:
457992974

Actual output:
100000


Fixed submission (verdict: Accepted):
mod=1000000007

def P(x):
    ans=1
    for i in range(x):
        ans=ans*(i+1)%mod
    
    return(ans)

n=int(input())

print(P(n))

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ans=1
for i in range(n):
  ans*=(i+1)
  ans%=1000000007

Failing test case input:
110000

Expected output:
559938709


Actual output:
no output


Fixed submission (verdict: Accepted):
n=int(input())
ans=1
for i in range(n):
  ans*=(i+1)
  ans%=1000000007
  
print(ans)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = 1
for i in range(1, N+1):
  s *= i
  s %= (7 + 1E+9)
print(s)

Failing test case input:
101101

Expected output:
511008164


Actual output:
511008164.0


Fixed submission (verdict: Accepted):
N = int(input())
s = 1
for i in range(1, N+1):
  s *= i
  s %= (7 + 1E+9)
print(int(s))

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inN = int(input())

D=1000000000 + 7
p=0
for i in range(inN):
  p*=i
  if (D < p): p=p%D

print(str(p))

Failing test case input:
101111

Expected output:
981391086


Actual output:
0


Fixed submission (verdict: Accepted):
inN = int(input())
 
D=1000000000+7
p=1
for i in range(inN):
  p*=(i+1)
  if (D < p): p=p%D
 
print(str(p))
Problem: p03796
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
sum=1
for i in range(n):
  sum*=i
  sum=sum%(10**9+7)
  
print(sum)

Failing test case input:
110011

Expected output:
422312314


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
sum=1
for i in range(n):
  sum*=i+1
  if sum>10**9:
    sum=sum%(10**9+7)
  
print(sum)

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input().rstrip())
a=1
mod=1e9+7
for i in range(1,N+1):
  a*=i
  a%=mod
print(a)


Failing test case input:
111110

Expected output:
910389867


Actual output:
910389867.0


Fixed submission (verdict: Accepted):
N=int(input().rstrip())
a=1
mod=1e9+7
for i in range(1,N+1):
  a*=i
  a%=mod
print(int(a))

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    MOD = 10**9 + 7

    ans = 1
    for i in range(N):
        ans *= i
        ans = ans % MOD

    return ans


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


Failing test case input:
101110

Expected output:
175005504


Actual output:
0


Fixed submission (verdict: Accepted):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    MOD = 10**9 + 7

    ans = 1
    for i in range(1, N+1):
        ans *= i
        ans = ans % MOD

    return ans


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

Problem: p03796
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n = int(input())
print(math.factorial(n)%1000000009)


Failing test case input:
111010

Expected output:
521433597


Actual output:
822179390


Fixed submission (verdict: Accepted):
import math

n = int(input())
print(math.factorial(n)%1000000007)
Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import floor
from decimal import Decimal

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

num = A
c = 0
while num < B:
    num *= 2
    c+=1

print(c)

Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
from math import floor
from decimal import Decimal

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

num = A
c = 0
while num <= B:
    num *= 2
    c+=1

print(c)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())

ans = 0

while x < y:
    x *= 2
    ans += 1
print(ans)


Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())

ans = 0

while x <= y:
    x *= 2
    ans += 1
print(ans)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,Y=map(int,input().split())

cnt=0
while(X<Y):
    X*=2
    cnt+=1
print(cnt)

Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
X,Y=map(int,input().split())

cnt=0
while(X<=Y):
    X*=2
    cnt+=1
print(cnt)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
 
num = 1
while x < y:
    x *= 2
    num += 1
 
print(num)

Failing test case input:
17699318 686618920047839292

Expected output:
36


Actual output:
37


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
 
num = 0
while x <= y:
    num += 1
    x *= 2
    
print(num)

Problem: p03479
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
x,y=map(int,input().split())
len=1
while True:
  x*=2
  if x*2<y:
    len+=1
  else:
    break
print(len)

Failing test case input:
946321 1138463356571161467

Expected output:
41


Actual output:
40


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
len=1
while True:
  if x*2<=y:
    len+=1
  else:
    break
  x*=2
print(len)

Problem: p03479
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a = list(map(int,input().split()))

k = a[1]
i = 1
l = a[0]
while True:
  l *= i
  if k < l:
    break
  i += 1
print(i-1)


Failing test case input:
29 9442735007

Expected output:
29


Actual output:
11


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))

k = a[1]
i = 2
l = a[0]
while True:
  l *= 2
  if k < l:
    break
  i += 1
print(i-1)
Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



def main(min_limit, max_limit):
    result = []
    i = min_limit

    while(i < max_limit + 1):
        result.append(i)
        i = i * 2
    print(len(result))
    print(result)


if __name__ == "__main__":
    min_limit, max_limit = [int(val) for val in input().split()]
    main(min_limit, max_limit)

Failing test case input:
30 7873218668121

Expected output:
38


Actual output:
38
[30, 60, 120, 240, 480, 960, 1920, 3840, 7680, 15360, 30720, 61440, 122880, 245760, 491520, 983040, 1966080, 3932160, 7864320, 15728640, 31457280, 62914560, 125829120, 251658240, 503316480, 1006632960, 2013265920, 4026531840, 8053063680, 16106127360, 32212254720, 64424509440, 128849018880, 257698037760, 515396075520, 1030792151040, 2061584302080, 4123168604160]


Fixed submission (verdict: Accepted):



def main(min_limit, max_limit):
    result = []
    i = min_limit

    while(i < max_limit + 1):
        result.append(i)
        i = i * 2
    print(len(result))


if __name__ == "__main__":
    min_limit, max_limit = [int(val) for val in input().split()]
    main(min_limit, max_limit)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

X,Y=input_int()
count=0
while X<Y:
    count+=1
    X*=2
print(count)

Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

X,Y=input_int()
count=0
while X<=Y:
    count+=1
    X*=2
print(count)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
ans = 0
while X <= Y:
    Y /= 2
    print(Y)
    ans += 1
print(ans)

Failing test case input:
1565492 686618920047839292

Expected output:
39


Actual output:
3.433094600239196e+17
1.716547300119598e+17
8.58273650059799e+16
4.291368250298995e+16
2.1456841251494976e+16
1.0728420625747488e+16
5364210312873744.0
2682105156436872.0
1341052578218436.0
670526289109218.0
335263144554609.0
167631572277304.5
83815786138652.25
41907893069326.125
20953946534663.062
10476973267331.531
5238486633665.766
2619243316832.883
1309621658416.4414
654810829208.2207
327405414604.11035
163702707302.05518
81851353651.02759
40925676825.513794
20462838412.756897
10231419206.378448
5115709603.189224
2557854801.594612
1278927400.797306
639463700.398653
319731850.1993265
159865925.09966326
79932962.54983163
39966481.274915814
19983240.637457907
9991620.318728954
4995810.159364477
2497905.0796822384
1248952.5398411192
39


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
ans = 0
while X <= Y:
    X *= 2
    ans += 1
print(ans)
Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
ans=0
while b>a:
  a*=2
  ans+=1
print(ans-1)

Failing test case input:
14975555 686618920047839292

Expected output:
36


Actual output:
35


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
ans=0
while b>=a:
  a*=2
  ans+=1
print(ans)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(X, Y):
    tmp = X
    ans = 0
    while tmp < Y:
        ans += 1
        tmp *= 2
    return ans

def main():
    X, Y = map(int, input().split())
    ans = solve(X, Y)
    print(ans)

if __name__ == "__main__":
    main()

Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
def solve(X, Y):
    tmp = X
    ans = 0
    while tmp <= Y:
        ans += 1
        tmp *= 2
    return ans

def main():
    X, Y = map(int, input().split())
    ans = solve(X, Y)
    print(ans)

if __name__ == "__main__":
    main()

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
 
num = 0
while x < y:
    num += 1
    x *= 2
    
print(num)

Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
 
num = 0
while x <= y:
    num += 1
    x *= 2
    
print(num)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,Y=map(int,input().split())
result=0
while X<=Y :
    print(X)
    X*=2
    result+=1
print(result)

Failing test case input:
240 1502541996

Expected output:
23


Actual output:
240
480
960
1920
3840
7680
15360
30720
61440
122880
245760
491520
983040
1966080
3932160
7864320
15728640
31457280
62914560
125829120
251658240
503316480
1006632960
23


Fixed submission (verdict: Accepted):
X,Y=map(int,input().split())
result=0
while X<=Y :
    
    X*=2
    result+=1
print(result)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,Y=list(map(int, input().split()))
present=[X]
i=0
while present[i]<Y:
    present.append(present[i]*2)
    i=i+1

print(len(present)-1)

Failing test case input:
25 100

Expected output:
3

Actual output:
2


Fixed submission (verdict: Accepted):
X,Y=list(map(int, input().split()))
present=[X]
i=0
while present[i]<=Y:
    present.append(present[i]*2)
    i=i+1

print(len(present)-1)

Problem: p03479
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, Y = map(int, input().split())
c = 1
while(True):
  if X <= Y:
    X *= 2
    c += 1
  else:
    break
print(c)

Failing test case input:
3 109

Expected output:
6


Actual output:
7


Fixed submission (verdict: Accepted):
X, Y = map(int, input().split())
c = 1
while(True):
  if X*2 <= Y:
    X *= 2
    c += 1
  else:
    break
print(c)

Problem: p03479
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x,y=map(int,input().split())
ans=0
while x<=y:
  x=x*2
  ans+1
  
print(ans)

Failing test case input:
2 122340544

Expected output:
26


Actual output:
0


Fixed submission (verdict: Accepted):
x,y=map(int,input().split())
ans=0
while x<=y:
  x=x*2
  ans+=1
  
print(ans)