ZhenlongDai/ACPR huggingface dataset:
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a*c <= b:
  print(c)
else:
  print(b/a)

Failing test case input:
001 2 7

Expected output:
2


Actual output:
2.0


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if b
  print(c)
else:
  print(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
if(A <= B):
    if(A * C <= B):
        print(C)
    else:
        print(A)
else:
    print(0)

Failing test case input:
001 2 7

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
if(A <= B):
    if(A * C <= B):
        print(C)
    else:
        print(B
else:
    print(0)

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a , b , c = map(int,input().split())

if( b < a):
    print (0)
elif(b/a > c):
    print (c)
else:
    print (b/a)


Failing test case input:
011 -1 7

Expected output:
-1


Actual output:
0


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

if( b < a):
    print (0)
elif(b
    print (c)
else:
    print (b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

input = [int(i) for i in stdin.readline().rstrip().split(' ')]

if (input[0] * input[2]) <= input[1]:
  print(input[2])
else:
  print(input[1] % input[0])

Failing test case input:
011 1 42

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
from sys import stdin

input = [int(i) for i in stdin.readline().rstrip().split(' ')]

if (input[0] * input[2]) <= input[1]:
  print(input[2])
else:
  print(input[1]

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c=map(int, input().split())
if b/a > c:
    print(c)
else:
    print(b/a)


Failing test case input:
6 0 0

Expected output:
0


Actual output:
0.0


Fixed submission (verdict: Accepted):
a, b, c=map(int, input().split())
if b/a > c:
    print(c)
else:
    print(b

Problem: p03105
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = list(map(int, input().split()))
n = b % a
if a * c >= b:
  print(c)
else:
  print(int((b - n) / a))

Failing test case input:
19 1 3

Expected output:
0


Actual output:
3


Fixed submission (verdict: Accepted):
a, b, c = list(map(int, input().split()))
n = b % a
if a * c <= b:
  print(c)
else:
  print(int((b - n) / a))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if a*c < b:
  print(c)
else:
  print(b/a)

Failing test case input:
001 -1 106

Expected output:
-1


Actual output:
-1.0


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if b
  print(c)
else:
  print(b
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
data = input().split()

result = (int(data[1]) / int(data[0])) 
if result < int(data[2]):
        if result >= 1:
            print(math.floor(result))
        elif result < 1:
            print("0")
elif result > int(data[2]):
    print(data[2])

Failing test case input:
6 0 0

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
import math
data = input().split()

result = (int(data[1]) 

if result <= int(data[2]):
        if result >= 1:
            print(math.floor(result))
        elif result < 1:
            print("0")
elif result > int(data[2]):
    print(data[2])

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
if c < a * b:
    print(c)
else:
    print(a*b)

Failing test case input:
011 1 42

Expected output:
0


Actual output:
11


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
if c < b 
    print(c)
else:
    print(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())
if A*C<=B:
  print(C)
else:
  print(B/A)

Failing test case input:
101 -1 106

Expected output:
-1


Actual output:
-0.009900990099009901


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
if A*C<=B:
  print(C)
else:
  print(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a,b,c = map(int, input().split())
print(min(c,math.ceil(b/a)))

Failing test case input:
010 1 7

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import math
a,b,c = map(int, input().split())
print(min(c,math.floor(b/a)))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil
a, b, c = map(int,input().split())
cnt = 0
if a * c <= b:
    print(c)
else:
    num = ceil(b / a) - 1
    print(num)


Failing test case input:
001 -1 106

Expected output:
-1


Actual output:
-2


Fixed submission (verdict: Accepted):
from math import floor
a, b, c = map(int,input().split())
cnt = 0
if a * c <= b:
    print(c)
else:
    num = floor(b / a)
    print(num)

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines

A,B,C = [int(i) for i in readline().split(' ')]
[print(C) if A*C <= B else print(A)]

Failing test case input:
001 0 73

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines

A,B,C = [int(i) for i in readline().split(' ')]
if A*C <= B:
  print(C)
elif A > B:
  print(0)
else:
  print(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = [int(x) for x in input().split()]
if a*c <= b:
    print('{0:.0f}'.format(c))
else:
    print('{0:.0f}'.format(b/a))

Failing test case input:
101 -1 106

Expected output:
-1


Actual output:
-0


Fixed submission (verdict: Accepted):
import math
a, b, c = [int(x) for x in input().split()]
if a*c <= b:
    print(math.floor(c))
else:
    print(math.floor(b/a))
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())


B_A = B

if B_A <= C:
    print(C)
else:
    print(B_A)

Failing test case input:
011 -1 106

Expected output:
-1


Actual output:
106


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())


B_A = (B

if B_A <= C:
    print(B_A)
else:
    print(C)

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
A, B, C =map(int, input().split())
if B / A >= C:
  print(C)
else:
  print(math.ceil(B/A))

Failing test case input:
7 3 2

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import math
A, B, C =map(int, input().split())
if B >= A * C:
  print(C)
else:
  print(math.floor(B/A))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

input = [int(i) for i in stdin.readline().rstrip().split(' ')]

if (input[0] * input[2]) <= input[1]:
  print(input[2])
else:
  print(input[1] / input[0])

Failing test case input:
011 0 73

Expected output:
0


Actual output:
0.0


Fixed submission (verdict: Accepted):
from sys import stdin

input = [int(i) for i in stdin.readline().rstrip().split(' ')]

if (input[0] * input[2]) <= input[1]:
  print(input[2])
else:
  print(input[1]

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

a, b, c = input().split()
a, b, c = int(a), int(b), int(c)

if b/a :
  print(c)

else:
  print(math.floor(b/a))

Failing test case input:
1 -12 -2

Expected output:
-12


Actual output:
-2


Fixed submission (verdict: Accepted):
import math

a, b, c = input().split()
a, b, c = int(a), int(b), int(c)

if b/a > c :
  print(c)

else:
  print(math.floor(b/a))

Problem: p03105
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B,C=map(int,input().split())
print(min(A+B,B+C,A+C))

Failing test case input:
1 19 7

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
A,B,C=map(int,input().split())
print(min(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int,input().split())
if(a > b):
  print(0)
elif(a*c <= b):
  print(b)
elif(a*c > b):
  print(a)

Failing test case input:
1 14 4

Expected output:
4


Actual output:
14


Fixed submission (verdict: Accepted):
a, b, c = map(int,input().split())
if(a > b):
  print(0)
elif(a*c <= b):
  print(c)
elif(a*c > b):
  print(b

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

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

if a*c<=b:
  print(c)
else:
  print(math.floor(b/3))

Failing test case input:
011 4 7

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import math

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

if a*c<=b:
  print(c)
else:
  print(math.floor(b/a))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())

r = B%A
s = (B-r)/A

print(min(C,s))


Failing test case input:
001 -1 73

Expected output:
-1


Actual output:
-1.0


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())

List=[B
print(min(List))
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split());print(min(b%a,c))

Failing test case input:
100 1 10

Expected output:
0

Actual output:
1


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split());print(min(b

Problem: p03105
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = map(int,input().split())
print(min(round(b/a), c))


Failing test case input:
101 -1 73

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
import math

a, b, c = map(int,input().split())
print(min(math.floor(b/a), c))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
print(min(B/A, C))

Failing test case input:
011 0 42

Expected output:
0


Actual output:
0.0


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
print(min(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b,c=map(int,input().split())
print(min(b/a,c))

Failing test case input:
1 -1 -1

Expected output:
-1


Actual output:
-1.0


Fixed submission (verdict: Accepted):

a,b,c=map(int,input().split())
print(min(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
print(min(b/a, c))

Failing test case input:
001 4 7

Expected output:
4


Actual output:
4.0


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
print(min(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
A,B,C=map(int,input().split())
can=math.floor(B/A)
print(can)
if can>=C:
  print(C)
else:
  print(can)

Failing test case input:
011 0 49

Expected output:
0


Actual output:
0
0


Fixed submission (verdict: Accepted):
import math
A,B,C=map(int,input().split())
can=math.floor(B/A)
if can>=C:
  print(C)
else:
  print(can)

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
  A,B,C=map(int, input().split())

  if B>= A*C:
    print(C)
  else:
    print(B%A)

main()


Failing test case input:
111 1 30

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
def main():
  A,B,C=map(int, input().split())

  if B>= A*C:
    print(C)
  else:
    print(B

main()

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
A,B,C = map(int,input().split())

if B/A>C:
    print(C)
elif B/A<C:
    print(math.floor(B/A))

Failing test case input:
001 7 7

Expected output:
7


Actual output:

Fixed submission (verdict: Accepted):
import math
A,B,C = map(int,input().split())

if (B/A)>=C:
    print(C)
elif (B/A)<C:
    print(math.floor(B/A))

Problem: p03105
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=input().split()
A=int(n[0])
B=int(n[1])
C=int(n[2])

if B>=A*C:
    print(A*C)
else:
    print(int(B/A))

Failing test case input:
101 -1 73

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
n=input().split()
A=int(n[0])
B=int(n[1])
C=int(n[2])

if B>=A*C:
    print(C)
elif B<A*C:
    print(B
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    A,B,C =  map(int, input().split())
    max_kai = round(B/A)
    if max_kai > C:
        print(C)
    else:
        print(max_kai)


if __name__ == "__main__":
    main()


Failing test case input:
011 -1 66

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
import math

def main():
    A,B,C =  map(int, input().split())
    max_kai = math.floor(B/A)
    if max_kai > C:
        print(C)
    else:
        print(max_kai)


if __name__ == "__main__":
    main()

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
print(min(A*C, B))

Failing test case input:
111 1 30

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
print(min(C, B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines

A,B,C = [int(i) for i in readline().split(' ')]
if A*C <= B:
  print(C)
elif A > B:
  print(0)
else:
  print(A)


Failing test case input:
001 9 13

Expected output:
9


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines

A,B,C = [int(i) for i in readline().split(' ')]
if A*C <= B:
  print(C)
elif A > B:
  print(0)
else:
  print(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

if B > A * C:
  print(A * C)
else:
  print(A)

Failing test case input:
011 -1 106

Expected output:
-1


Actual output:
11


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
 
if B > A * C:
  print(C)
else:
  print(B

Problem: p03105
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B, C = map(int,input().split())
X =A
if X >= C:
    print(C)
else:
    print(X)

Failing test case input:
1 13 4

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
A, B, C = map(int,input().split())

if B
    print(C)
else:
    print(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = [int(x) for x in input().split()]
if a*c < b:
    print('{0:.0f}'.format(c))
else:
    print('{0:.0f}'.format(b/a))

Failing test case input:
011 -1 33

Expected output:
-1


Actual output:
-0


Fixed submission (verdict: Accepted):
import math
a, b, c = [int(x) for x in input().split()]
if a*c <= b:
    print(math.floor(c))
else:
    print(math.floor(b/a))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
ans=min(b/a,c)
print(ans)

Failing test case input:
011 2 7

Expected output:
0


Actual output:
0.18181818181818182


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if b
  print(c)
else:
  print(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(min(b%a,c))


Failing test case input:
001 2 7

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(min(b
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(min(round(b/a),c))

Failing test case input:
101 -1 106

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
import math
a,b,c=map(int,input().split())
print(min(math.floor(b/a),c))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(c if b/a<=c else b/a)

Failing test case input:
7 2 0

Expected output:
0


Actual output:
0.2857142857142857


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(min(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

if round(B/A) > C:
    print(C)
else:
    print(round(B/A))

Failing test case input:
011 -1 106

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())

if B
    print(C)
else:
    print(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
data = input().split()

result = (int(data[1]) / int(data[0])) 
if result < int(data[2]):
        if result > 1:
            print(math.floor(result))
        elif result < 1:
            print("0")
elif result > int(data[2]):
    print(data[2])

Failing test case input:
011 -1 66

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
import math
data = input().split()

result = (int(data[1]) 

if result <= int(data[2]):
        if result >= 1:
            print(math.floor(result))
        elif result < 1:
            print("0")
elif result > int(data[2]):
    print(data[2])

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

if B/A >= C:
  print(C)
else:
  print(B/A)


Failing test case input:
001 -1 48

Expected output:
-1


Actual output:
-1.0


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())

if B/A >= C:
  print(C)
else:
  print(B

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split(" "))
if b / a >= c:
  print(c)
else:
  print(b / a)

Failing test case input:
111 1 41

Expected output:
0


Actual output:
0.009009009009009009


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split(" "))
if b 
  print(c)
else:
  print(b

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())

r = B%A
s = (B-r)/A

print(C,s)


Failing test case input:
1 -12 -2

Expected output:
-12


Actual output:
-2 -12.0


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())

List=[B
print(min(List))

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int,input().split())
if(a > b):
  print(0)
elif(a*c <= b):
  print(c)
elif(a*c > b):
  print(a)

Failing test case input:
011 2 -5

Expected output:
-5


Actual output:
0


Fixed submission (verdict: Accepted):
a, b, c = map(int,input().split())
if(a > b):
  print(0)
elif(a*c <= b):
  print(c)
elif(a*c > b):
  print(b
Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
data = input().split()

result = (int(data[1]) / int(data[0])) 
if result < int(data[2]):
        if result > 1:
            print(int(data[1]) / int(data[0]))
        elif result < 1:
            print("0")
elif result > int(data[2]):
    print(data[2])

Failing test case input:
001 -1 73

Expected output:
-1


Actual output:
0


Fixed submission (verdict: Accepted):
import math
data = input().split()

result = (int(data[1]) 

if result <= int(data[2]):
        if result >= 1:
            print(math.floor(result))
        elif result < 1:
            print("0")
elif result > int(data[2]):
    print(data[2])

Problem: p03105
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

if B > A * C:
  print(C)
elif A * C > B and B > A:
  print(A)
else:
  print(0)

Failing test case input:
001 7 7

Expected output:
7


Actual output:
0


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
 
if B > A * C:
  print(C)
else:
  print(B
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
ans = 1
if N == 1:
    print(M)
else:
    if M % N == 0:
        ans = M 
    for n in range(2, int(M ** 0.5) + 1):
        X = M - (n * N)
        if X % n == 0 and X >= 0:
            ans = max(ans, n)
    print(ans)


Failing test case input:
001110 1001101101

Expected output:
333367


Actual output:
3003


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
ans = 1
if N == 1:
    print(M)
else:
    for n in range(2, int(M ** 0.5) + 1):
        if M % n == 0 and M / N >= n:
            ans = max(ans, n)
            if M 
                ans = max(ans, M 
    print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a_list = []
n, m = map(int, input().split())
for i in range(math.ceil(m**(1/2)), 0, -1):
    if m % i == 0:
        a_list.append(i)
border = math.floor(m / n)
for aa in a_list:
    if border >= aa:
        ans = aa
        break
print(ans)

Failing test case input:
010001 1010101101

Expected output:
43733


Actual output:
23097


Fixed submission (verdict: Accepted):
import math
a_list = []
n, m = map(int, input().split())
for i in range(math.ceil(m**(1/2)), 0, -1):
    if m % i == 0:
        a_list.append(i)
        a_list.append(m
border = math.floor(m / n)
a_list = list(reversed(sorted(a_list)))
for aa in a_list:
    if border >= aa:
        ans = aa
        break
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M =[int(i)for i in input().split()]
l=[1]
for i in range(2,int(M**0.5+1)):
    if M%i==0:
        if M/i >= N:
            l.append(i)
        if i >= N:
            l.append(M/i)
print(int(max(l)))

Failing test case input:
000001 1110111010

Expected output:
1110111010


Actual output:
555055505


Fixed submission (verdict: Accepted):
N,M =[int(i)for i in input().split()]
l=[]
for i in range(1,int(M**0.5+2)):
    if M%i==0:
        if M/i >= N:
            l.append(i)
        if i >= N:
            l.append(M/i)
print(int(max(l)))

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import math

N, M = [int(s) for s in input().strip().split()]

if N == 1:
    print(M)
    exit()

max_gcd = -1
ROOT_M = int(math.sqrt(M))

for d in range(1, ROOT_M+1):
    if d > M/N:
        break

    if M % d == 0:
        max_gcd = d

print(max_gcd)


Failing test case input:
010100 1110001111

Expected output:
101863


Actual output:
10897


Fixed submission (verdict: Accepted):

import math

N, M = [int(s) for s in input().strip().split()]

if N == 1:
    print(M)
    exit()

ROOT_M = int(math.sqrt(M))
divisors = []
for d in range(1, ROOT_M+1):
    if M % d == 0:
        divisors.append(d)
        divisors.append(M

divisors.sort()
MAX_VAL = int(M/N)
for d in divisors:
    if d > MAX_VAL:
        break
    max_gcd = d

print(max_gcd)
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, M = map(int, input().split())
ans = -1
for d in range(1, int(M**0.5)+1):
    if M % d == 0 and d <= M / N:
        ans = d
print(ans)

Failing test case input:
011000 1111111001

Expected output:
95563


Actual output:
21593


Fixed submission (verdict: Accepted):

N, M = map(int, input().split())
ans = 1
for d in range(1, int(M**0.5)+1):
    if M % d == 0 and d <= M / N:
        ans = max(ans, d)
        if M 
            ans = max(ans, M
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
 
N,M = map(int,input().split())
 
ans = 1
for i in range(1,int(math.sqrt(M))+1+1):
  if M % i != 0:
    continue
  B = M / i
  
  if (i * N <= M):
    ans = max(ans,i)
  if (B * N <= M):
    ans = max(ans,B)

print(ans)

Failing test case input:
000100 1010000101

Expected output:
10000001


Actual output:
10000001.0


Fixed submission (verdict: Accepted):
import math
 
N,M = map(int,input().split())
 
ans = 1
for i in range(1,int(math.sqrt(M))+1+1):
  if M % i != 0:
    continue
  B = int(M / i)
  
  if (i * N <= M):
    ans = max(ans,i)
  if (B * N <= M):
    ans = max(ans,B)

print(ans)

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

i=1
ans=0

while i*i<=m:
    if m%i==0:
        if n<=m/i:
            ans=max(ans,i)
        if n<=i:
            ans=max(ans,m/i)
        
    i+=1

print(ans)


Failing test case input:
010001 1010101101

Expected output:
43733


Actual output:
43733.0


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

i=1
ans=0

while i*i<=m:
    if m%i==0:
        if n<=m/i:
            ans=max(ans,i)
        if n<=i:
            ans=max(ans,m
        
    i+=1

print(ans)

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

ans = 1

if N == 1:
    print(M)
    exit()

import math

l = []
for i in range(1, int(math.sqrt(M)) + 1):
    if M % i == 0 and i * N <= M:
        l.append(i)

print(max(l))


Failing test case input:
010001 1111111011

Expected output:
58923


Actual output:
19641


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

ans = 1

import math

l = []
for i in range(1, int(math.sqrt(M)) + 1):
    if M % i == 0 and i * N <= M:
        l.append(i)
        if M 
            l.append(M 

print(max(l))

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N, M = map(int, input().split(" "))
    i = M 
    while True:
        if M % i == 0:
            break
        elif i == 2:
            break
        else:
            i -= 1
    print(i)


if __name__ == '__main__':
    main()

Failing test case input:
101001 1110110001

Expected output:
10767


Actual output:
1110110001


Fixed submission (verdict: Accepted):
def main():
    N, M = map(int, input().split(" "))
    for i in range(M 
        if M % i == 0 and i <= M / N:
            print(i)
            break


if __name__ == '__main__':
    main()
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n, m = (list)(map(int, input().split()))

ans = 1
upper = m/n+1
for i in range(2, (int)(math.sqrt(m))+1):
    if m % i == 0:
        if i < upper:
            ans = max(ans, i)

print(ans)


Failing test case input:
001010 1000100000

Expected output:
912500


Actual output:
29200


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

upper = m
ans = 0
for i in range(1, upper+1):
    if m % i == 0:
        ans = i
        if (m 
            ans = m 
            break

print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n, m = map(int, input().split())
kotae=1

for i in range(1,int(math.sqrt(m))+1):
	if m%i==0:
		if i*n<=m:
			kotae=max(kotae, i)
		if (m/i)*n<=m:
			kotae=max(kotae, i)
print(kotae)

Failing test case input:
001010 1000100000

Expected output:
912500


Actual output:
29200


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

for i in range(1,int(math.sqrt(m))+1):
	if m%i==0:
		if i*n<=m:
			kotae=max(kotae, i)
		if (m
			kotae=max(kotae, m
print(kotae)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import sqrt, ceil

def factorization(n):
    l = [n]
    for i in range(1, ceil(sqrt(n))+1):
        if not n % i:
            l.append(i)
    return l

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

if N == 1:
    print(M)
else:    
    f = factorization(M)
    print(max([i for i in f if i <= M/N]))


Failing test case input:
000100 1010000101

Expected output:
10000001


Actual output:
1111


Fixed submission (verdict: Accepted):
from math import sqrt, ceil

def factorization(n):
    l = [n]
    for i in range(1,ceil(sqrt(n))+1):
        if not n % i:
            l.append(i)
            l.append(n
    return l
N, M = map(int, input().split())

if (M % N) == 0:
    print(M
    exit()

f = factorization(M)
ans = 1
for i in f:
    if (M / i) >= N:
        ans = max(i, ans)
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math
Input = sys.stdin.readline
 
N, M = map(int, Input().split())
 
D = [d for d in range(1, int(math.sqrt(M))+1) if M % d == 0]
D.sort(reverse=True)
for d in D:
    if M >= N*d:
        print(d)
        sys.exit()

Failing test case input:
011100 1011111011

Expected output:
86813


Actual output:
11647


Fixed submission (verdict: Accepted):
import sys
import math
Input = sys.stdin.readline
 
N, M = map(int, Input().split())
D = []
 
for i in range(int(math.sqrt(M)), 0, -1):
    if M % i == 0:
      D.append(i)
      D.append(M 

D.sort(reverse=True)
for d in D:
    if M >= N*d:
        print(d)
        break
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, M = map(int, input().split())
ans = -1
for d in range(1, int(M**0.5)+1):
    if M % d == 0 and d <= M / N:
        ans = max(ans, d)
print(ans)

Failing test case input:
010100 1110110010

Expected output:
100290


Actual output:
33207


Fixed submission (verdict: Accepted):

N, M = map(int, input().split())
ans = 1
for d in range(1, int(M**0.5)+1):
    if M % d == 0 and d <= M / N:
        ans = max(ans, d)
        if M 
            ans = max(ans, M
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())
ans=1
if M%N==0:
    print(int(M/N))
else:
    
    for i in range(2,int(M%N)+1):
        if (M-((N-1)*i))%i==0:
            ans=i
    print(ans)

Failing test case input:
010100 1110110010

Expected output:
100290


Actual output:
6686


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
ans=0
for i in range(1,10**5):
    if M%i==0:
        a=max(M
        b=min(M
        if M
            ans=a
        if M
            ans=b
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
if m%n == 0:
    print(n)
else:
    factor = [1]
    for i in range(2,int(m**0.5)+2):
        if m%i == 0:
            factor.append(i)
    factor.reverse()
    for i in range(len(factor)):
        if m%factor[i] == 0:
            print(factor[i])
            break

Failing test case input:
011100 1001111011

Expected output:
79033


Actual output:
12667


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
factor = []
for i in range(1,int(m**0.5)+2):
    if m%i == 0:
        factor.append(i)
        factor.append(m
factor.sort()
factor.reverse()
for i in range(len(factor)):
    if m%factor[i] == 0:
        if m
            print(factor[i])
            break

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


inn,inm = list(map(int,input().split()))
root = math.floor(math.sqrt(inm))

a = []
for i in range(1,root+1):
  if inm%i == 0:
    a.append(i)
    a.append(inm/i)
    
a.sort()
for i in a:
  if i > inn:
    print(int(inm/i))
    break

Failing test case input:
000001 1110110010

Expected output:
1110110010


Actual output:
555055005


Fixed submission (verdict: Accepted):
import math


inn,inm = list(map(int,input().split()))
root = math.floor(math.sqrt(inm))

a = []
for i in range(1,root+1):
  if inm%i == 0:
    a.append(i)
    a.append(inm/i)
    
a.sort()
for i in a:
  if i >= inn:
    print(int(inm/i))
    break
Problem: p03241
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
import sys
MOD = 1000000007

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

if n == 1:
    print(m)
    sys.exit()

ans = 1
for i in range(1, int(math.sqrt(m))+1):
    if i > m/n:
        break
    if m % i == 0:
        ans = i

print(ans)


Failing test case input:
000101 1110110010

Expected output:
332070


Actual output:
33207


Fixed submission (verdict: Accepted):
import math
import sys
MOD = 1000000007

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

if n == 1:
    print(m)
    sys.exit()

ans = 1
for i in range(1, int(math.sqrt(m))+1):
    if m % i == 0:
        j = m / i
        if i <= m/n:
            ans = max(ans, i)
        if j <= m/n:
            ans = max(ans, j)

print(int(ans))

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

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

x=int(math.floor(math.sqrt(m)))

y=int(math.floor(m/n))

ans=1
for i in range(1,x+1):
  if(m % i==0):
    if i <= y:
      ans=max(ans,i)
    if (int(m/i)) <= y:
      ans=max(ans,m/i)
print(ans)




Failing test case input:
001010 1000100000

Expected output:
912500


Actual output:
912500.0


Fixed submission (verdict: Accepted):
import math

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

x=int(math.sqrt(m))

ans=1
for i in range(1,x+1):
  if m%i==0:
    if i*n<=m:
      ans=max(ans,i)
    if int(m/i)*n<=m:
      ans=max(ans,int(m/i))
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
 
N,M = map(int,input().split())
 
ans = 1
for i in range(1,int(math.sqrt(M)+1)+1):
  if M % i != 0:
    continue
  B = M / i
  
  if (i * N <= M):
    ans = max(ans,i)
  if (B * N <= M):
    ans = max(ans,B)
 
print(ans)

Failing test case input:
001110 1011101101

Expected output:
32251


Actual output:
32251.0


Fixed submission (verdict: Accepted):
import math
 
N,M = map(int,input().split())
 
ans = 1
for i in range(1,int(math.sqrt(M))+1+1):
  if M % i != 0:
    continue
  B = int(M / i)
  
  if (i * N <= M):
    ans = max(ans,i)
  if (B * N <= M):
    ans = max(ans,B)

print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = list(map(int, input().split()))
for i in range(int(M**0.5), 0, -1):
  if M % i == 0 and M >= i * N:
    print(i)
    exit()

Failing test case input:
001100 1011111001

Expected output:
268841


Actual output:
3761


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

print(max([j for i in range(int(M**0.5), 0, -1) for j in [i, int(M/i)] if M % j == 0 and M / N >= j]))
Problem: p03241
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M = map(int,input().split())

yakusuu = []
for i in range(1, int((M + 1)**(1/2)+1)):
    if M % i == 0:
        yakusuu.append(i)
        yakusuu.append(M/i)

for i in range(len(yakusuu) - 1, 0, -1):
    if M / yakusuu[i] >= N:
        print(yakusuu[i])
        break

Failing test case input:
000100 1010000101

Expected output:
10000001


Actual output:
909091.0


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

yakusuu = []
for i in range(1, int((M + 1)**(1/2)+1)):
    if M % i == 0:
        yakusuu.append(i)
        yakusuu.append(int(M/i))
yakusuu.sort()
yakusuu.reverse()


for i in yakusuu:
    if M / i >= N:
        print(i)
        break

Problem: p03241
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from math import sqrt

N, M = map(int, input().split())
sqrtm = int(sqrt(M) + 1)
D = []
for i in range(2, sqrtm):
    if M % i == 0:
        D.append(i)
ans = 0
for d in D:
    if d * N <= M:
        ans = d
print(ans)


Failing test case input:
010001 1010101101

Expected output:
43733


Actual output:
23097


Fixed submission (verdict: Accepted):
from math import sqrt

N, M = map(int, input().split())
sqrtm = int(sqrt(M) + 1)
D = set()
for i in range(1, sqrtm):
    if M % i == 0:
        D.add(i)
        D.add(M 
D = sorted(list(D))
ans = 0
for d in D:
    if d * N <= M:
        ans = d
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import sqrt

n, m = map(int, input().split())
l = []
for i in range(2, int(sqrt(m)) + 1):
	if m % i == 0:
		l.append(i)

ans = 1
for d in l:
	if d * n <= m:
		ans = max(ans, d)

print(ans)

Failing test case input:
010101 1110111010

Expected output:
105745


Actual output:
26245


Fixed submission (verdict: Accepted):
from math import sqrt

n, m = map(int, input().split())
l = []
for i in range(1, int(sqrt(m)) + 1):
	if m % i == 0:
		l.append(i)
		l.append(m 

ans = 1
for d in l:
	if d * n <= m:
		ans = max(ans, d)

print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
ans = 1
if N == 1:
    print(M)
else:
    for n in range(2, int(M ** 0.5) + 2):
        X = M - (n * N)
        if X % n == 0 and X >= 0:
            ans = n
    print(ans)


Failing test case input:
010100 1110001111

Expected output:
101863


Actual output:
10897


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
ans = 1
if N == 1:
    print(M)
else:
    for n in range(2, int(M ** 0.5) + 1):
        if M % n == 0 and M / N >= n:
            ans = max(ans, n)
            if M 
                ans = max(ans, M 
    print(ans)
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N, M = list(map(int, input().split()))
if N == 1:
  print(M)
  exit()
X = int(math.sqrt(M))+1
for i in range(N, X):
  if M % i == 0:
      print(int(M/i))
      exit()
print(1)

Failing test case input:
111001 1100100011

Expected output:
4591


Actual output:
1


Fixed submission (verdict: Accepted):
import math
N, M = list(map(int, input().split()))
if N == 1:
  print(M)
  exit()
X = int(math.sqrt(M))+1
for i in range(N, X):
  if M % i == 0:
      print(int(M/i))
      exit()
X = int(M / N)
for i in range(X, 0, -1):
  if M % i == 0:
      print(i)
      exit()
print(1)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
	n, m = map(int, input().split())

	total = m
	current_max = 1
	for i in range(1, total+2):
		if m % i == 0:
			current_max = i
		if i * i > m:
			break

	print(current_max)


if __name__ == '__main__':
    main()

Failing test case input:
010010 1010000000

Expected output:
100000


Actual output:
31250


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

	total = m
	answer = 1
	for i in range(1, total+1):
		if i * i > m:
			break

		if m % i == 0:
			answer = max(i, answer)
			if i >= n:
				answer = max(m

	print(answer)


if __name__ == '__main__':
    main()

Problem: p03241
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
read = sys.stdin.read
from math import sqrt, ceil
def main():
    n, m = map(int, input().split())
    if n == 1:
        r = 1
        for i1 in range(2, ceil(sqrt(m))+1):
            if m % i1 == 0:
                r = i1
        print(r)
        sys.exit()
    r = 1
    for i1 in range(2, ceil(sqrt(m))+1):
        if m % i1 == 0:
            r = i1
        if n * i1 > m:
            break
    print(r)

if __name__ == '__main__':
    main()


Failing test case input:
001110 1011001001

Expected output:
211109


Actual output:
11111


Fixed submission (verdict: Accepted):

import sys
read = sys.stdin.read
from math import sqrt, ceil
def main():
    n, m = map(int, input().split())
    if n == 1:
        print(m)
        sys.exit()

    divs = []
    for i1 in range(2, ceil(sqrt(m))+1):
        if m % i1 == 0:
            divs.append(i1)
            divs.append(int(m/i1))
    divs.sort()
    r = 1
    for div in divs:
        if n * div <= m:
            r = div
        else:
            break
    print(r)

if __name__ == '__main__':
    main()

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
ans = 1
if N == 1:
    print(M)
else:
    for n in range(2, int(M ** 0.5) + 1):
        if M % n == 0 and M / n >= N:
            ans = n
    print(ans)


Failing test case input:
2 324

Expected output:
162


Actual output:
18


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
ans = 1
if N == 1:
    print(M)
else:
    for n in range(2, int(M ** 0.5) + 1):
        if M % n == 0 and M / N >= n:
            ans = max(ans, n)
            if M 
                ans = max(ans, M 
    print(ans)
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

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

x=math.floor(math.sqrt(m))
y=math.floor(m/n)

s=min(x,y)

ans=1
for i in range(1,s+1):
  if(m % i==0):
    ans=i
    
print(ans)


Failing test case input:
011000 1111111001

Expected output:
95563


Actual output:
21593


Fixed submission (verdict: Accepted):
import math

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

x=int(math.sqrt(m))

ans=1
for i in range(1,x+1):
  if m%i==0:
    if i*n<=m:
      ans=max(ans,i)
    if int(m/i)*n<=m:
      ans=max(ans,int(m/i))
print(ans)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
x = 0
m = 0
for i in range(10**5):
    if i**2 < M <= (i+1)**2:
        m = i+1
for i in range(N, m):
    if M % i == 0:
        x = M 
        break
if x == 0:
    for i in reversed(range(1,m+1)):
        if M % i == 0:
            x = i
            break
print(x)

Failing test case input:
100100 1011101101

Expected output:
293


Actual output:
31351


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
x = 0
m = 0
for i in range(10**5):
    if i**2 < M <= (i+1)**2:
        m = i+1
        break
if m >N:
    for i in range(N, m):
        if M % i == 0:
            x = M 
            break
if x == 0:
    for i in reversed(range(1, M 
        if M % i == 0:
            x = i
            break
print(x)

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
def divisor(n):
    res = []
    for i in range(1,int(math.sqrt(n))+2):
        if n % i == 0:
            res.append(i)
            if n / i != i:
                res.append(n / i)
    return res
    
N, M = map(int, input().split())
maxd = 0
for d in divisor(M):
    if M / d >= N:
        maxd = max(maxd, d)
print(maxd)



Failing test case input:
011100 1100110011

Expected output:
69307


Actual output:
69307.0


Fixed submission (verdict: Accepted):
import math
def divisor(n):
    res = []
    for i in range(1,int(math.sqrt(n))+2):
        if n % i == 0:
            res.append(i)
            if n 
                res.append(n 
    return res
    
N, M = map(int, input().split())
maxd = 0
for d in divisor(M):
    if M 
        maxd = max(maxd, d)
print(maxd)
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import math


def divisor(x):
    d = [1]
    for i in range(2, math.ceil(math.sqrt(x)) + 1):
        if x % i == 0:
            d.append(i)
    if d[-1] != x:
        d.append(x)
    return d
    


def submit():
    n, m = map(int, input().split())

    
    d = divisor(m)
    nd = len(d)

    
    l = 0
    r = nd - 1
    while l <= r:
        mid = (l + r) 
        if n * d[mid] <= m:
            l = mid + 1
        else:
            r = mid - 1
    print(d[l - 1])


submit()        

Failing test case input:
000101 1110110010

Expected output:
332070


Actual output:
33207


Fixed submission (verdict: Accepted):

import math


def divisor(x):
    d = {}
    for i in range(1, math.ceil(math.sqrt(x)) + 1):
        q, r = divmod(x, i)
        if r == 0:
            d[i] = 1
            if q != i:
                d[q] = 1
    d = list(d.keys())
    d.sort()
    return d
    


def submit():
    n, m = map(int, input().split())

    
    d = divisor(m)
    nd = len(d)

    
    l = 0
    r = nd - 1
    while l <= r:
        mid = (l + r) 
        if n * d[mid] <= m:
            l = mid + 1
        else:
            r = mid - 1
    print(d[l - 1])


submit()

Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
x = 0
m = 0
for i in range(10**5):
    if i**2 < M <= i*(i+1):
        m = i+1
        break
for i in range(N, m):
    if M % i == 0:
        x = M 
        break
if x == 0:
    for i in reversed(range(1,m+1)):
        if M % i == 0:
            x = i
            break
print(x)

Failing test case input:
001110 1011001101

Expected output:
531267


Actual output:
1011001101


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
x = 0
m = 0
for i in range(10**5):
    if i**2 < M <= (i+1)**2:
        m = i+1
        break
if m >N:
    for i in range(N, m):
        if M % i == 0:
            x = M 
            break
if x == 0:
    for i in reversed(range(1, M 
        if M % i == 0:
            x = i
            break
print(x)

Problem: p03241
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from math import sqrt

N, M = map(int, input().split())
sqrtm = int(sqrt(M) + 1)
D = []
for i in range(1, sqrtm):
    if M % i == 0:
        D.append(i)
ans = 0
for d in D:
    if d * N <= M:
        ans = d
print(ans)


Failing test case input:
2 324

Expected output:
162


Actual output:
18


Fixed submission (verdict: Accepted):
from math import sqrt

N, M = map(int, input().split())
sqrtm = int(sqrt(M) + 1)
D = set()
for i in range(1, sqrtm):
    if M % i == 0:
        D.add(i)
        D.add(M 
D = sorted(list(D))
ans = 0
for d in D:
    if d * N <= M:
        ans = d
print(ans)
Problem: p03241
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n, m = (list)(map(int, input().split()))

upper = (int)(math.sqrt(m/n))
for i in reversed(range(1, upper+1)):
    if m % i == 0:
        print(i)
        exit()


Failing test case input:
100100 1010000101

Expected output:
1111


Actual output:
11


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

upper = m
ans = 0
for i in range(1, upper+1):
    if m % i == 0:
        ans = i
        if (m 
            ans = m 
            break

print(ans)

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

ans=1

for i in range(2,10**5):
    if (M/i)<N:
        break
    elif M%i==0:
        if M/i>=N:
            ans=i
print(ans)

Failing test case input:
001000 1000110000

Expected output:
1000110


Actual output:
99375


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
ans=0
for i in range(1,10**5):
    if M%i==0:
        a=max(M
        b=min(M
        if M
            ans=a
        if M
            ans=b
print(ans)

Problem: p03241
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

















import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations
from bisect import bisect_left, bisect_right


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")
MAX_DIGIT = 50





N, M = l_inpl()

ans = 1

for k in range(1, int(M**0.5)+1):
    if k*N <= M:
        if M % k == 0:
            ans = k
    else:
        break

print(ans)

Failing test case input:
010101 1110111010

Expected output:
105745


Actual output:
26245


Fixed submission (verdict: Accepted):

















import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations
from bisect import bisect_left, bisect_right


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")
MAX_DIGIT = 50





N, M = l_inpl()

ans = 1

for k in range(1, int(M**0.5)+1):
    if k*N <= M:
        if M % k == 0:
            ans = max(ans, k)
            if k**2 == M:
                continue
            if (M
                ans = max(ans, M

print(ans)