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):

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
                
    divisors.sort()
    return divisors


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

c_set = list(set(make_divisors(a))&set(make_divisors(b)))

c_set.sort()
print(c_set[-c])


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, K = (int(i) for i in input().split())
list = []
for i in range(1, 100):
  if A % == 0 and B % i == 0:
    list.append(i)
print(list[len(list)-K])

A, B, C = (int(i) for i in 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):
if B / A >= C:
  print(C)
else:
  print(int(B/A))

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,C=(int(x) for x in input().split())
count=0
for i in range(1,C):
  if A*i>B:
    break
  else:
    count+=1
print(count)

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


A,B,K=(int(x) for x in input().split())
count=0
result=0
for i in reversed(range(1,min([A,B])+1)):
  if A%i==0 and B%i==0:
    count+=1
  if count==K:
    result=i
print(result)

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

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):
,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())
min(B//A,C)

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

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

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())
s = B//A
if C<=s:
	print(C)
else
	print(s)

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

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())

d=a//b

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

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

d=b//a

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


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


def main():
    one_try = int(sys.argv[1])
    money = int(sys.argv[2])
    count = int(sys.argv[3])
    n = 0
    while(True):
        if money >= one_try:
            money = money - one_try
            n = n + 1
        else:
            break
        if n == count:
            break
    print(n)


if __name__ == '__main__':
    main()
    

import sys


def main():
    lines = sys.stdin.readlines().split(' ')
    one_try = int(lines[0])
    money = int(lines[1])
    count = int(lines[2])
    n = 0
    while(True):
        if money >= one_try:
            money = money - one_try
            n = n + 1
        else:
            break
        if n == count:
            break
    print(n)


if __name__ == '__main__':
    main()
    

import sys


def main():
    lines = sys.stdin.readlines()[0].split(' ')
    one_try = int(lines[0])
    money = int(lines[1])
    count = int(lines[2])
    n = 0
    while(True):
        if money >= one_try:
            money = money - one_try
            n = n + 1
        else:
            break
        if n == count:
            break
    print(n)


if __name__ == '__main__':
    main()
    

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())
print(max(b//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):
from sys import stdin


def a(input_string):
    print(input_string)
    favorite_sound_fee ,my_money, count = [int(x) for x in input_string.split()]
    hear_count = 0
    while(hear_count < count and my_money >= favorite_sound_fee):
        my_money -= favorite_sound_fee
        hear_count += 1
    return hear_count


def main():
    input_line = stdin.readline().rstrip()
    answer = a(input_line)
    print(answer)


if __name__ == '__main__':
    main()


from sys import stdin


def a(input_string):
    favorite_sound_fee ,my_money, count = [int(x) for x in input_string.split()]
    hear_count = 0
    while(hear_count < count and my_money >= favorite_sound_fee):
        my_money -= favorite_sound_fee
        hear_count += 1
    return hear_count


def main():
    input_line = stdin.readline().rstrip()
    answer = a(input_line)
    print(answer)


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(' '))


def calc1(A,B,C):
  if A*C <= B:
    return C
  else:
    
    N = 0
    while A*N <=B:
      N += 1
    return N-1
print(calc1(A,

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


def calc1(A,B,C):
  if A*C <= B:
    return C
  else:
    
    N = 0
    while A*N <=B:
      N += 1
    return N-1
print(calc1(A,B,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):
S = input()
S = list(S)
count = 0


previousCount = 0
while(1) :
    if len(S) < 2:
        break
    
    if S[0] != S[1] :
        S.pop(0)
        S.pop(0)
        count+=2
    
    for i in range(1,len(S)-2) :
        if S[i] != S[i+1] :
            if S[i-1] != S[i+2] :
                S.pop(i)
                S.pop(i)
                count +=2
                break
    if previousCount == count :
        break
    previousCount = count
            
print(count)
        


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

tem = B/A
if tem < C :
    print(int(tem))
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(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())
if b >= a:
    print(round(b/a))
elif round(b/a) > c:
    print(c)
else:
    print('0')

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

if b//a > c:
    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())
d=a//b
if (d+1)*b<=a:
  d+=1
print(min(d,c))

a,b,c=map(int,input().split())
d=b//a
if (d+1)*a<=b:
  d+=1
print(min(d,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 = int(input())
b = int(input())
c = int(input())
if b//a > c:
    print(c)
else:
    print(b//c)



a,b,c = map(int,input().split())
a_set = {1}
b_set = {1}
for i in range(1,a):
    if a % i == 0:
        a_set.add(i)

for i in range(1,b):
    if b % i == 0:
        b_set.add(i)

c_list = list(a_set & b_set)
c_list.sort()
print(c_list[c - 1])


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



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):
class Solution:
  def solve(self, A, B, C):
    count = 0
    spent = 0
    while B >= 0:
      B -= A
      count += 1
      if count == C:
        return C
    return count

def main():
  A = int(input())
  B = int(input())
  C = int(input())
  print(Solution().solve(A, B, C))
        
if __name__ == "__main__":
   main()

class Solution:
  def solve(self, A, B, C):
    count = 0
    while True:
      B -= A
      if B < 0: break
      count += 1
      if count == C: return C
    return count

def main():
  inputs = list(map(int, input().split()))
  A, B, C = inputs
  print(Solution().solve(A, B, C))
        
if __name__ == "__main__":
   main()

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_input = input()
lst = usr_input.split()

a = int(lst[0])
b = int(lst[1])
c = int(lst[2])

print(b//a)


usr_input = input()
lst = usr_input.split()

a = int(lst[0])
b = int(lst[1])
c = int(lst[2])

devider_a=[]
devider_b=[]
for i in range(1,a,1):
    if a%i == 0:
        devider_a.append(i)

for i in range(1,b,1):
    if b % i == 0:
        devider_b.append(i)

common_devider = []
for element in devider_a:
    for value in devider_b:
        if element==value:
            common_devider.append(value)

print(common_devider[c-1])


usr_input = input()
lst = usr_input.split()

a = int(lst[0])
b = int(lst[1])
c = int(lst[2])

if b//a < c:
    print(b//a)
else:
    print(c)

      


Verdicts: Wrong Answer

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 = list(map(int, input().split()))

sum = 1
count = 0

if B > A:
  for i in range(1, C):
    sum *= A
    if sum > B:
      count = i
      break
  print(count)

else:
  print('0')

from collections import Counter
print(2*min(Counter(list(input()).values()))

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

Verdicts: Wrong Answer

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):
string = input()
one = 0
zero = 0
for s in string:
    if s == '1':
        ones += 1
    else:
        zeros += 1

print(2*min(one, zero))


import math

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

required = a * c
limit = b

if required <= limit:
    print(c)
else:
    print(math.floor(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/B >= C:
  print(C)
else:
  print(A/B)


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

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


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

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


Verdicts: Wrong Answer

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(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(A,B,C)
x = B // A

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

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

if x <= C :
	print( x )
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, k = map(int, input().split())
number_list = [i for i in range(1, 101) if a % i == 0 and b % i == 0][::-1]
print(number_list[k-1])


a, b, k = map(int, input().split())
num_list = [i for i in range(1, 101) if a % i == 0 and b % i == 0]
num_list.reverse()
print(number_list[k-1])

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

if a * c > b:
    print(c)
else:
    print(a // b)

a, b, k = map(int, input().split())
num_list = [i for i in range(a, b) if a % i == 0 and b % i == 0][::-1]
print(number_list[k-1])

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

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(b // a)


a, b, c = map(int, input().split())
if b // a > c:
    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().spit())
if b//a < c:
  print(b//a)
else:
  print(c)

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())
if B*C <= A:
  r = C
else:
  r = A // B

print(r)

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

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())
C = B//A
print(C)

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

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

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

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

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,n  = map(int, input().split())

for i in range(1, 100):
	if a == b:
		print('1')
	elif abs(a-b) % i == 0:
		# print(i)
		if a % (abs(a-b)/i) == 0:
			n -= 1
			if n == 0:
				print(int(abs(a-b)/i))

a,b,c = int(input().split())
ans = 0
for i in range(c):
    b = b - a
    if b < 0:
        break
    ans += 1

print(c)

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

Verdicts: Wrong Answer

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(int(min(C,A/B)))

A,B,C = map(int,input().split())
print(int(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(C if A * C >= B else B // A)

A, B, C = map(int, input().split())
print(C if A * C <= B 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 = str(input())
cube = list(S)
count0 = 0
count1 = 0

for string in cube:
    if string == '0':
        count0 = count0 + 1
    else:
        count1 = count1 + 1

print(min(count0,count1) * 2)


ABC = list(map(int,input().split()))
count = 0
money = ABC[1]

for n in range(ABC[2]):
    if money >= ABC[0]:
        money = money - ABC[0]
        count = count + 1

print(count)

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 = str(input())
ss = s
for i in range(int(100000/2+1)):
	ss = ss.replace('01', '')
	ss = ss.replace('10', '')

print(len(s)-len(ss))

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

if ans>c:
  print(c)
else:
  print(ans)

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):
ABC = input().split()
A = int(ABC[0])
B = int(ABC[1])
C = int(ABC[2])
if A / B > C:
  print(C)
else:
  print(A / B)

ABC = input().split()
A = ABC[0]
B = ABC[1]
C = ABC[2]
if A / B > C:
  print(C)
else:
  print(A / B)

ABC = input().split()
A = int(ABC[0])
B = int(ABC[1])
C = int(ABC[2])
if B / A > C:
  print(C)
else:
  print(int(B / A))

Verdicts: Wrong Answer

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())
result = 0
while C>=0:
  B-A
  C-=1
  result +=1
  if B<=A:
    break
print(result)

A,B,C=map(int,input().split())
result = 0
left_money=B
while left_money>=A and C>0:
  left_money-=A
  C-=1
  result +=1
else:
  print(result)

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(b//a,c))

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

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


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


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

Verdicts: Wrong Answer

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):
A,B,K= (int(i) for i in input().split())

def gcd(a,b):
  if b>a:
    a,b=b,a

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

first=gcd(A,B)
if first==1:
  print(1)
else:
  k=1
  if K==1:
    print(first)
  else:
    for i in reversed(range(1,first)):
      if A%i==0:
        if B%i==0:
          k=k+1
          if k==K:
            print(i)
            break

#!/usr/bin/env python3
import sys
{ % if prediction_success % }
{ % endif % }
{ % if mod or yes_str or no_str % }

{ % endif % }
{ % if mod % }
MOD = None  # type: int
{ % endif % }
{ % if yes_str % }
YES = "None"  # type: str
{ % endif % }
{ % if no_str % }
NO = "None"  # type: str
{ % endif % }
{ % if prediction_success % }


def solve(A: int, B: int, C: int):
    return
{ % endif % }


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    { % if prediction_success % }

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)
    { % else % }
    # Failed to predict input format
    pass
    { % endif % }


if __name__ == '__main__':
    main()


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

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

main()


Verdicts: Wrong Answer

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 = input().split()
print(str(int(b) // int(a)))
          

a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)
result = b // a
if c < result:
    result = c
print(str(result))


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):
nums=str(input())
arr=list(map(int,nums))
l=len(arr)
a=0
i=0
while i<len(arr)-1:
    if arr[i]!=arr[i+1]:
        del arr[i:i+2]
        #print(arr)
        a+=2
        i=0
    i+=1
print(a)

n,m=map(int,input().split())
bridge=[[] for i in range(m)]
iland=[[i+1] for i in range(n)]
for i in range(m):
    bridge[i]=list(map(int,input().split()))
ans=[0 for i in range(m+1)]
ans[0]=int((n-1)*n/2)
k=1
for i in reversed(bridge):
    ans[k]=ans[k-1]
    for j in range(len(iland)):
        if i[0] in iland[j]:
            temp=j
            break
    for j in range(len(iland)):
        if i[1] in iland[j]:
            if temp!=j:
                ans[k]=ans[k-1]-len(iland[j])*len(iland[temp])
                iland[temp].extend(iland[j])
                del iland[j]
                break
    if ans[k]==0:
        ans[k:]=[0 for l in range(m-k)]
        break
    k+=1
for i in range(m):
    print(ans[m-1-i])

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

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())

ans = 0

if ( b / a < 1 ):
    ans = 0
elif (b / a < c):
    ans = c
else:
    ans = b / a

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

ans = 0

lista = list(range(a+1))
aa = lista.pop(0)

listb = list(range(b+1))
bb = listb.pop(0)

if (a < b):
    li = [i for i in lista if a % i == 0 and b % i == 0]
    li = sorted(li, reverse=True)
    ans = li[k-1]
else:
    li = [i for i in listb if a % i == 0 and b % i == 0]
    li = sorted(li, reverse=True)
    ans = li[k-1]

print(ans)

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

ans = 0

if (b < a):
    ans = 0
elif (b / a < c):
    ans = int(b / a)
else:
    ans = c

print(ans)

Verdicts: Wrong Answer

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 (b//a) <= c:
    print(c)
else:
    print(b//a)



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

if (b//a) <= c:
    print(int(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())
if b//a>=c:
  print(b//a)
else:
  print(b//a)

a,b,c = map(int,input().split())
if b//a>=c:
  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):
N, M = [int(e) for e in input().split(" ")]
d_node2setindex = {}
ABs = []
for _ in range(M):
    ABs.append([int(e) for e in input().split(" ")])
maxValue = N * (N-1) // 2
ans = [maxValue]
buf_sets = []
flagSkip = False
for i in range(M-1):
    a, b = ABs[M-1-i]
    # print("a,b", a, b)
    if flagSkip is True:
        ans.append(0)
        continue
    
    idx_a = d_node2setindex.get(a, None)
    idx_b = d_node2setindex.get(b, None)
    
    #     for j, s in enumerate(buf_sets):
    #         if idx_a is None:
    #             if a in s:
    #                 idx_a = j 
    #         if idx_b is None:
    #             if b in s:
    #                 idx_b = j
    #         if idx_a is not None and idx_b is not None:
    #             break
    delta = 0
    if idx_a is None and idx_b is None:
        s_new = set([a, b])
        idx_set = len(buf_sets)
        d_node2setindex[a] = idx_set
        d_node2setindex[b] = idx_set
        buf_sets.append(s_new)
        delta = 1
    elif idx_a is not None and idx_b is None:
        delta = len(buf_sets[idx_a])
        buf_sets[idx_a].add(b)
        d_node2setindex[b] = idx_a
    elif idx_a is None and idx_b is not None:
        delta = len(buf_sets[idx_b])
        buf_sets[idx_b].add(a)
        d_node2setindex[a] = idx_b
    else:
        if idx_a != idx_b:
            s_a = buf_sets[idx_a]
            s_b = buf_sets[idx_b]
            delta = len(s_a) * len(s_b)
            [d_node2setindex.__setitem__(e, idx_a) for e in s_b]
            
            #     d_node2setindex[e] = idx_a
            buf_sets[idx_a] = s_a | s_b
            buf_sets[idx_b] = None
            
    
    d = ans[-1] - delta
    ans.append(d)
    if d == 0:
        flagSkip = True

txt = "\n".join(map(str, reversed(ans)))
print(txt)


A, B, C = [int(e) for e in input().split(" ")]

# N = A*C
# if N <= B:
#     print(C)

p, _ = divmod(B, A)
if p > C:
    print(C)
else:
    print(p)


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):
x, y, z = map(int,input().split())
print(max(int(y//x), z))

x, y, z = map(int,input().split())
print(min(int(y/x), z))

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 b*c <= a:
    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):
def main():
    a, b, c = map(int, input().split())

    b // a >= c ? print(c) : print(b // a)

if __name__ == "__main__":
    main()


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

    if b // a >= c:
        print(c)
    else:
        print(b // a)
    
if __name__ == "__main__":
    main()


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, c = list(map(int, input().split()))
    return min(c, b//a)

main()


def main():
    a, b, c = list(map(int, input().split()))
    print(min(c, b//a))

"""def main():
    a, b, k = list(map(int, input().split()))
    lst = []
    for i in range(1, 101):
        if a % i == 0 and b % i == 0:
            lst.append(i)
    print(sorted(lst, reverse=True)[k-1])"""

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())

cost = 0
ans = 0
isContinue = True
while True:
  cost += a
  ans += 1
  if(cost>=b):
    break
print(max(ans-1,c))

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

cost = 0
ans = 0
while True:
  if(b <= cost):
    break
  cost += a
  ans += 1
print(min(ans-1,c)
  

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

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


Verdicts: Wrong Answer

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() for x in input().split())
print(min(C,A//B))

A,B,C=(int(x) for x in 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, k = map(int, input().split())
ct = 0
for i in range(1, 101):
    if a % i == 0 and b % i == 0:
        ct += 1
    if ct == k:
        print(i)
        break


a, b, c = map(int, input().split())
cnt = 0
while cnt < c and a <= b:
    b -= a
    cnt += 1
print(cnt)


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())

if b >= a * c:
    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())

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

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

if b >= a * c:
    print(c)
else:
    print(int(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):
li = list(map(int,input().split()))
print(li)
a = li[0]
b = li[1]
c = li[2]

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

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

a = li[0]
b = li[1]
c = li[2]

if b/a >= c :
    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):
import math
a, b, c = map(int, input().split())
D = b / a
if a > b:
    print(0)
elif D == c:
    print(c)
elif D > c:
    print(math.floor(D))
elif c > D:
    print(c)
else:
    pass

a, b, c = map(int, input().split())
flag = True
count = 0
while flag:
  if c <= count || b - a < 0:
    break
  b -= a
  count += 1
print(count)

a, b, c = map(int, input().split())
flag = True
count = 0
while flag:
  if c <= count or b - a < 0:
    break
  b -= a
  count += 1
print(count)

Verdicts: Wrong Answer

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(a//b)

a,b,c=map(int,input().split())
if b//a > c:
  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):
# D - Decayed Bridges
from collections import deque

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

graph = [[] for _ in range(N)]
AB = deque()
for i in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    AB.append([a, b])
    graph[a].append(b)
    graph[b].append(a)

def isDivided(a, b, graph):
    d = deque()
    d.append(a)
    done = [0] * N
    while len(d)>0:
        now = d.popleft()
        done[now] = 1
        for i in graph[now]:
            if i==b:
                return 0
            elif done[i]==0:
                d.append(i)
    return sum(done)

ans = 0
for i in range(M):
    a, b = AB.popleft()
    graph[a].remove(b)
    graph[b].remove(a)
    tmpa = isDivided(a, b, graph)
    tmpb = isDivided(b, a, graph)
    if tmpa!=0:
        ans += tmpa*tmpb
        print(ans)
    else:
        print(ans)



# A - Favorite Sound

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,c = map(int,input().split())

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

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):
import math
A,B,C=map(int,input().split())
can=math.floor(B/A)
print(can)
if can>=C:
  print(C)
else:
  print(can)

a=[0,0]
s=[]
a[0],a[1],k=map(int,input().split())
for i in range(1,min(a)+1):
  if a[0]%i==0 and a[1]%i==0:
    s.append(i)
print(s[len(s)-k])

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

Verdicts: Wrong Answer

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,inpout().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):
class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n+1)]
        self.rank = [0] * (n+1)
        self.sizes = [1] * (n+1)
        self.root = [1] * (n+1)
 
    
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
 
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
            self.root[x] = -1
            self.sizes[y] += self.sizes[x]
        else:
            self.par[y] = x
            self.root[y] = -1
            self.sizes[x] += self.sizes[y]
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
        
 
    
    def same_check(self, x, y):
        return self.find(x) == self.find(y)
    
    def size(self, x):
        return self.sizes[find(x)]
    
 
n, m = map(int, input().split())
lst = [list(map(int, input().split())) for _ in range(m)]
 
all_comb = n*(n-1)/2
 
a = UnionFind(n)
 
ans = [all_comb]
for pair in reversed(lst):
    if a.same_check(pair[0], pair[1]):
        ans.append(ans[-1])
        pass
    else:
        ans.append(ans[-1] - a.sizes[a.find(pair[0])]*a.sizes[a.find(pair[1])])
        a.union(pair[0], pair[1])
    
for i in reversed(ans[:-1]):
    print(int(i))

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

Verdicts: Runtime Error

Accepted