TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
N, M = [int(elm) for elm in input().split(" ")]
bridges = [[int(elm) for elm in input().split(" ")] for _ in range(M)]

class Graph:
    pass

graph = {}
for node in range(1, N+1):
    graph[node] = [node]
    #graph_mem[node] = []

graph_n_mem = [0] + [1 for i in range(N)]
n_all_pairs = N * (N-1) // 2




def calc_out(n_list):
    out = n_all_pairs
    for elm in n_list:
        if elm <= 1:
            continue
        tmp = elm * (elm-1) // 2
        out -= tmp
    return out

outs = []
for A, B in reversed(bridges):
    #print(graph_n_mem)
    #print("before AB", A, B)
    A = graph[A][0]
    B = graph[B][0]
    
    if graph[A] != graph[B]:
        #graph_n_mem[A] += len(graph[B])
        graph_n_mem[A] += graph_n_mem[B]
        graph_n_mem[B] = 0

        graph[A] += graph[B]
        for node in graph[A]:
            graph[node] = graph[A]
            
        #graph_mem[A] += graph_mem[B]
        

    out = calc_out(graph_n_mem)
    outs.append(out)

outs = outs[::-1]
outs = outs[1:] + [n_all_pairs]
for out in outs:
    print(out)

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

n = B // A
out = min(n, C)
print(out)

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a, b, k = (int(i) for i in input().split())
x = []
c = max(a, b)
for i in  range(1, c+1):
    if (a % i == 0) and (b % i == 0):
        x.append(i)

print(x[-k])

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

a, b, c = (int(i) for i in input().split())  
print(min(c,(int)(b/a)))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a = int(input('A'))
b = int(input('B'))
c = int(input('C'))

count = 0
for i in range(b // a):
    if i >= c:
        break
    count += 1

print(count)

A,B,C = map(int,input().split())
ans = 0

while B >= A and C != ans:
    B -= A
    ans += 1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map(int, input().split())

K = A // B

if K > C:
    print(C)
else:
    print(K)


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

K = B // A

if K > C:
    print(C)
else:
    print(K)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a = list(map(int.input().split()))
if a[1]//a[0] == 0:
  print(0)
elif a[1]//a[0]> a[2]:
  print(a[2])
else:
  print(a[1]//a[0])

A,B,C = map(int.input().split())
if B//A == 0:
  print(0)
elif B//A > C:
  print(C)
else:
  print(B//A)

A,B,C = map(int.input().split())
if B//A < C:
  print(B//A)
else:
  print(C)

a = list(map(int,input().split()))
if a[1]//a[0] == 0:
  print(0)
elif a[1]//a[0]> a[2]:
  print(a[2])
else:
  print(a[1]//a[0])

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c=[int(x) for x input().split()]
print(b//a,c)

a,b,c=[int(x) for x in input().split()]
print(min(b//a,c))

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = map(int, input().split())

print(max(int(B//A),C))

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

print(min(int(B//A),C))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,x,c=map(int,input().split())

k=x//a

print(max(k,c))

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

m=b//a

if m>=c:
  print(c)
else:
  print(m)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
import math
A = int(input())
B = int(input())
C = int(input())

if B >= A * C:
    print(C)
else :
    print(math.floor(B/A))
if A > B:
    print(0)

import math
A = int(input())
B = int(input())
C = int(input())
if A > B:
    print(0)
else :
    if B >= A * C:
        print(C)
    else :
        print(math.floor(B/A))

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
import sys
input = sys.stdin.readline
def print_ans(A, B, C):
    """Test Case
    >>> print_ans(2, 11, 4)
    4
    >>> print_ans(3, 9, 5)
    3
    >>> print_ans(100, 1, 10)
    0
    """
    print(max(C, B // A))


if __name__ == '__main__':
    A, B, C = map(int, input().rstrip().split())
    print_ans(A, B, C)




import sys
input = sys.stdin.readline
def print_ans(A, B, C):
    """Test Case
    >>> print_ans(2, 11, 4)
    4
    >>> print_ans(3, 9, 5)
    3
    >>> print_ans(100, 1, 10)
    0
    """
    print(min(C, B // A))


if __name__ == '__main__':
    A, B, C = map(int, input().rstrip().split())
    print_ans(A, B, C)




Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c = map(int,input().split())
print(min((b//a),c)

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, K = map(int, input().split())
 
cand = []
for i in range(100,0,-1):
  if A%i == 0 and B%i == 0:
    cand += [i]
print(cand[K-1])

A, B, C = map(int, input().split())
print(min(C, B//A))

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, times = map(int,input().split())

temp = 0
temp1 = 0
divisor = []
counter = 0

if A >= B:
  temp = A
  temp1 = B

else:
  temp = B
  temp1 = A

for i in range(1,temp1):
  if temp1 % i == 0 and i != temp1:
    divisor.append(i)

print(divisor)
for j in (reversed(divisor)):
  if temp % j ==0:
    counter += 1
    if counter == times:
      print(j)
      break
  



fee, money, times = map(int,input().split())

if money/fee >= times:
   print(times)

else:
   print(int(money/fee))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A = list(map(int, input().split()))
a = A[1]//A[0]
if a >= A[2]:
    print(a)
else:
    print(A[2])

A = list(map(int, input().split()))
a = A[1]//A[0]
if a <= A[2]:
    print(a)
else:
    print(A[2])

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = list(map(int,input().split()))
if A * C > B:
    print(int(B / A))
else:
    print((C)

A,B,C = list(map(int,input().split()))
if A * C > B:
    print(int(B / A))
else:
    print(C)

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = map(int,input().split())

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

print(min(C,s)


import numpy as np
A,B,C = map(int,input().split())

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

List = [C,s]
print(np.min(List))


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

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

print(C,s)


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

List=[B//A,C]
print(min(List))


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
# -*- coding: utf-8 -*-

S = input().strip()
#-----

num_red = S.count("0")
num_blue = len(S) - num_red

print( min(num_red,num_blue) * 2 )


# -*- coding: utf-8 -*-

A,B,C = [int(i) for i in input().rstrip().split()]

max = B // A
if max < C:
  print(max)
else:
  print(C)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
import sys
 
stdin = sys.stdin

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

a, b, c = na()
if a * c <= b:
    print(a * c)
else:
    print(b // a)

import sys
 
stdin = sys.stdin

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

a, b, c = na()
print(min(b // a, c))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
print("")

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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,K=list(map(int,input().split()))
count=0
z=[A,B]
for i in range(max(z),0,-1):
  if (A%i==0)and(B%i==0):
    count+=1
    if count==K:
      ans=i
      break
print(ans)

A,B,K=list(map(int,input().split()))
count=0
z=[A,B]
for i in range(1,max(z)+1):
  if (A%i==0)and(B%i==0):
    count+=1
    if count==K:
      ans=count
      break
print(ans)

a=list(map(int,input().split()))
A=a[0]
B=a[1]
C=a[2]
if B>=A*C:
  answer=C
else:
  answer=B//A
print(answer)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
inp = [int(i) for i in input().split()]
li =[]
li2 =[]

for k in range(1,inp[0]+1):
  f = inp[0] / k
  if f.is_integer():
    li.append(k)

for m in range(1,inp[1]+1):
  h = inp[1] / m
  if h.is_integer():
    li2.append(m)
    
li3 = list(set(li) & set(li2))
li3.sort()
print(li3[inp[2]-1])

inp = input().split()
k = int(inp[1]) // int(inp[0])
if k >= int(inp[2]):
  f = int(inp[2])
else:
  f = k
print(f)


Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C=map(int,input().split())
cnt=0
for i in range(C):
    if B-=A>=0:
        cnt+=1
    else:
        break
print(cnt)  

A,B,C=3,9,5
cnt=0
for i in range(C):
    B-=A
    if B>=0:
        cnt+=1
    else:
        break
print(cnt)  

A,B,C=map(int,input().split())
cnt=0
for i in range(C):
    B-=A
    if B>=0:
        cnt+=1
    else:
        break
print(cnt)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = map(int,input().split())
if A*C =<B:
  print("C")
else:
  print(B % A)

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C=map(int,input().split())
print(min(A+B,B+C,A+C))

A,B,C=map(int,input().split())
print(min(B//A,C))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
S = input()
N = len(S)
 
for _ in range(N):
    S = S.replace('01', '').replace('10', '')
 
print(N - len(S))

A, B, C=input().split()
print(int(B)/int(A))

A, B, C=input().split()
X = int(int(B)/int(A))

if X > int(C):
    print(C)
else:
    print(X)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):

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

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



A, B, C=map(int,input().split())
 
Tmp = B//A
if Tmp > C:
  print(C)
else:
  print(Tmp)
  

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):

using namespace std;

int main() {
    int a, b, c, q;
    cin >> a >> b >> c;
    q = b/a;
    if(q < c){
        cout << q << endl;
    }else{
        cout << c << endl;
    };
    return 0;
}

import fractions


def main():
    a = list(map(int, input().split()))
    b = fractions.gcd(a[0], a[1])
    c = b
    for i in range(a[2]-1):
        while True:
            c -= 1
            if b % c == 0:
                break
    print(c)


main()

a = list(map(int, input().split()))
b = a[1]//a[0]
print(b if b < a[2] else a[2])

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = map(int,input().split())

min(C,B // A)

A,B,C = map(int,input().split())
     
print(min(C,B // A))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a, b, k = map(int, input().split())

div=[]
for i in range(1,min(a,b)+1):
    if(a%i==0 and b%i==0):
        div.append(i)
if(div):
    div.reverse()
    print(div[k-1])
else:
    print(1)


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


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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
import re
s=input()
m=0
for i in range(len(s)//2):
  dst = re.sub(r'01|10', "", s)
  dst = re.sub(r'0000000000011111111111|1111111111100000000000', "", dst)
  if dst == s:
    break
  m += len(s) - len(dst)
  s=dst
print(m)

a,b,c=map(int,input().split())
print(c if (b / a > c) else b // a)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
s=input()
a=0
b=0
for i in range(len(s)):
    if s[i]=='0':
        a=a+1
    else:
        b=b+1

if a>b:
    print(2*b)
else:
    print(2*a)


a,b,c=map(int,input().split())
n=0
n=b/a
if n>c:
    n=c
print(int(n))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map(int, input().split())

if A<B:
  print(0)
elif B//A < C:
  print(B//A)
else:
  print(C)

A, B, C = map(int, input().split())
 
if A>B:
  print(0)
elif B//A < C:
  print(B//A)
else:
  print(C)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map(int, input().split())
print(min(A*C, B//A))

A, B, C = map(int, input().split())
print(min(A*C, B))

A, B, C = map(int, input().split())
print(min(C, B//A))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c=map(int,input().split())
print(max(c,b//a))


# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B, C = lr()
time = B // A
answer = min(C, time)
print(answer)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a, b, c = map(int, input().spit())

print(min(b//a, c))


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

print(min(b//a, c))



Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
def ABC_120_A():
    A,B,C = map(int, input().split())
    if A*B >= B*C:
        print(C)
    else:
        print(int(B/A))

if __name__ == '__main__':

    ABC_120_A()

def ABC_120_A():
    A,B,C = map(int, input().split())
    if int(B/A) >= C:
        print(C)
    else:
        print(int(B/A))

if __name__ == '__main__':

    ABC_120_A()

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map(int, input().split(' '))

print(max(C, B // A))


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

print(min(C, B // A))


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C=map(int,input().split())


B_A = (B//A)

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

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


B_A = B//A

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

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


B_A = B//A

print(B_A)

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


B_A = (B//A)

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = map(int,input().split())
print(min(B//A,C)

A,B,C = map(int,input().split())
print(min(B//A,C))

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
import re

si = input()

def count_zeroone(s, c):
  if(s.count('01') > 0 or s.count('10') > 0):
    f_r = s.count('10')
    s = re.sub('10','',s)
    f_l = s.count('01')
    s = re.sub('01','',s)
    return count_zeroone(s, (c+f_l+f_r))
  else:
    return (c)
print( (count_zeroone(si, 0) * 2 ) )

import re

si = input()

def count_zeroone(s, c):
  f_l = s.count('01')
  if(f_l > 0 or s.count('10') > 0):
    s = re.sub('01','',s)
    f_r = s.count('10')
    s = re.sub('10','',s)
    return count_zeroone(s, (c+f_l+f_r))
  else:
    return (c)
print( (count_zeroone(si, 0) * 2 ) )

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

l = []

greatest = a

if(b > a):
  greatest = b
  
for i in range(1, greatest):
  if(a % i == 0 and b % i == 0):
    l.append(i)

if(len(l) == 0):
  if(a == b):
    l.append(1)
    
print(str(l[len(l) - int(k)]))

import re

si = input()

def count_zeroone(s, c):
  f_l = s.count('01')
  if(f_l > 0):
    s = re.sub('01','',s)
  f_r = s.count('10')
  if(f_r > 0):
    s = re.sub('10','',s)
  if(f_l > 0 or f_r > 0):  
    return count_zeroone(s, (c+f_l+f_r))
  else:
    return (c)
print( (count_zeroone(si, 0) * 2 ) )


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

if( (b / a) >= c):
  print(c)
else:
  print(str(int(b/a)))
    

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
S = input()
print(min(len(re.findall('0', S)), len(re.findall('1', S))) * 2 if len(S) > 1 else 0)

A, B, C = map(int, input().split())
print(C if A * C < B else B //A)

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
n = 0
X = 0
while X<1:
	# print(L)
	K = len(L)-1
	
	for i in range(K):
		if L[i]+L[i+1]==1:
			L.pop(i)
			L.pop(i)
			n=n+1
			break
		elif i == K-1:
			X=1

# print(L)
print(n*2)


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

print(min(int(B/A), C))

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
#!/usr/bin/python

input_data = input().split()

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]
total = 0

d4 = d2 % d1
if d4 > d3:
    total += 1

print(total)

#!/usr/bin/python

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

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]
total = 0

d4 = d2 % d1
if d4 > d3:
    total += 1

print(total)

#!/usr/bin/python

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

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]
total = 0

d4 = int(d2 / d1)
if d4 > d3:
    total += 1

print(total)



#!/usr/bin/python

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

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]
total = 0

d4 = d2 / d1
if d4 > d3:
    total += 1

print(total)


#!/usr/bin/python

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

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]

d4 = int(d2 / d1)
if d4 > d3:
    total = d3
else:
    total = d4

print(total)



Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c = map(int,input().split())
print(min(c,a//b))

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map(int, input().split())
print(B // A)

A, B, C = map(int, input().split())
print(B // A if B // A < C else C)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, K = map(int, input().split())
index = 0
for i in range(100, 0, -1):
  if int(A / i) == 0 and int(B / i) == 0:
    index += 1
    if(K == index):
      print(i)


A, B, C = map(int, input().split())
maximum = B // A
print(min(C, maximum))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map(int, (input().split(' ')))
print(max(C, B // A))

A, B, C = map(int, (input().split(' ')))
print(min(C, B // A))


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, C = map (int, input().split())

print(min(C,　B　//　A))

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

print(min(C, B // A))

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
def main():
    A,B,K=list(map(int, input().split()))
    divisors=[]
    count = 0
    for i in range(1,min(A,B)+1):
        if min(A,B)%i==0:
            divisors.append(i)
    for divisor in divisors:
        if max(A,B)%divisor==0:
            count+=1
            if count==K:
                print(divisor)
if __name__ =='__main__':
    main()


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

if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c = map(int,input().split())
print( min(b//a,c)

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


Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,K = map(int,input().split())
T=[]
for i in range(1,101):
    if A%i==0 and B%i==0:
        T.append(i)
T=sorted(T,reverse=True)
print(T[K-1])

A,B,C = map(int,input().split())
if B//A < C:
    print(B//A)
else:
    print(C)

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c=map(int,input.split())
print(min(b//a,c))

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


Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a=list(input())
b=a[0]
c=a[1]
d=a[2]
e=c/b
if e>d:
  print(d)
elif d>e:
  print(e)


a=list(input())
b=a(0)
c=a(1)
d=a(2)
e=c/b
if e>d:
  print(d)
elif d>e:
  print(e)


a=[input()]
b=a(0)
c=a(1)
d=a(2)
e=c/b
if e>d:
  print(d)
elif d>e:
  print(e)

a=[input()]
b=a(0)
c=a(1)
d=a(2)
e=c/b
if e>>d:
  print(d)
elif d>>e:
  print(e)


a=list(input().split())
b=a[0]
c=a[1]
d=a[2]
e=c/b
if e>d:
  print(d)
elif d>e:
  print(e)


a=list(input().split())
b=int(a[0])
c=int(a[1])
d=int(a[2])
e=int(c/b)
if e>=d:
  print(d)
elif d>e:
  print(e)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c=map(int,input().split())
print(min(a//b,c))

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C=(int(i) for i in input().split())

a=0
for i in range(C+1):

    B=B-A
    a+=1
    if B<=0:
        break
print(a)


A,B,C=(int(i) for i in input().split())

a=0

for i in range(C):
    if A>B:
        break
    B=B-A
    a+=1
    if B<=0:
        break
print(a)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
in_str = input()
input_list = map(int,in_str)
per = input_list[0]
money = input_list[1]
target = input_list[2]
time = int(money/par)
ans = 0
if(time>=target):
  ans = target
else:
  ans = time
print(ans)

in_str = input()
input_list = list(map(int,in_str.split()))
per = input_list[0]
money = input_list[1]
target = input_list[2]
time = int(money/per)
ans = 0
if(time>=target):
  ans = target
else:
  ans = time
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c = map(int,input().split())
print(min(c,a//b))


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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A, B, K = map(int, input().split())
#A, B, K = 12, 8, 2


if A > B:
	tmp = B
	B = A
	A = tmp
	

count = 0
ans = 0

for i in range(1,A+1):
	if A % i == 0 and B % i == 0:
		count += 1
		if count == K:
			ans = i
			K = 0
			break

print(ans)

A,B,C = int(input().split())
ans = B//A

if ans > C:
	ans = C

print(ans)

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

if A > B:
	tmp = B
	B = A
	A = tmp

count = 0
ans = 0

for i in range(1,A+1):
	if A % i == 0 and B % i == 0
		count += 1
		if count == K:
			ans = i
			break

print(ans)

A,B,C = int(input().split())
ans = int(B/A)

if ans > C:
	ans = C

print(ans)

A,B,C = map(int,input().split())
#A,B,C = 2,1,3
ans = B//A

if ans > C:
	ans = C

print(ans)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):



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

if A * B < C:
    print(C)
else:
    print(B // A)




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

if A * C < B:
    print(C)
else:
    print(B // A)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C = map(int, input().split())
print(min(A//B, C))

A,B,C = map(int, input().split())
print(min(B//A, C))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
#coding:UTF-8

a = input()
b = input()
c = input()

if a*c <= b:
	print('高橋くんは' + a*c + '円以上持っているのでお気に入りの音を' + c + '回聞いて満足します。')
 	print(c)
    
else:
  	print('高橋くんが満足できないこともあります。')
    print(b/a)

#coding:utf-8
a = input()
b = input()
c = input()

if a*c <= b:
    print(c)
    print("高橋くんは8円以上持っているのでお気に入りの音を4回聞いて満足します。")

else:
    print(b/a)
    print("高橋くんが満足できないことがあります。")



#coding:utf-8

a = input()
b = input()
c = input()

if a*c <= b:
	print(c)

else:
	print(b/a)


#coding:UTF-8

a = input()
b = input()
c = input()

if a*c <= b:
	print('高橋くんは' + a*c + '円以上持っているのでお気に入りの音を' + c + '回聞いて満足します。')
 	print(c)
    
else:
  	print('高橋くんが満足できないこともあります。')
    print('b/a')

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

if num > c:
	print(c)

else:
	print(num)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a, b, c = map(lambda x: int(x), input().split())
if a * c <= b:
  print(a * c)
else:
  print(int(b/a))

a, b, c = map(lambda x: int(x), input().split())
if a * c <= b:
  print(c)
else:
  print(int(b/a))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a,b,c=map(int,input().split())
print(min(b//a, c)

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
from fractions import*
a,b,k=map(int,input().split());c=0
for i in range(a,0,-1):
  c+=(gcd(a,b)%i==0)
  if c==k:print(i)

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a, b, c= map(int, input().split())
print(min(c, b//a)

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
A,B,C=map(int,input().split())
if A*C<B:
  print(B)
else:
  print(B//A)

A,B,C=map(int,input().split())
if A*C<B:
  print(C)
else:
  print(B//A)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi likes the sound when he buys a drink from a vending machine.  That sound can be heard by spending A yen (the currency of Japan) each time.  Takahashi has B yen. He will hear the sound as many times as he can with that money, but at most C times, as he would be satisfied at that time.  How many times will he hear the sound?

Submission attempts (in order):
a. b, c = map(int, input().split())
z = b // a
if z >= c:
  print(c)
else:
  print(z)

a, b, c = map(int, input().split())
z = b // a
if z >= c:
  print(c)
else:
  print(z)

Verdicts: Runtime Error

Accepted