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

class UnionFind():
  def __init__(self, n):
    self.n = n
    self.parents = [-1] * n

  def find(self, x):
    if self.parents[x] < 0:
      return x
    else:
      self.parents[x] = self.find(self.parents[x])
      return self.parents[x]

  def union(self, x, y):
    x = self.find(x)
    y = self.find(y)

    if x == y:
      return

    if self.parents[x] > self.parents[y]:
            x, y = y, x

    self.parents[x] += self.parents[y]
    self.parents[y] = x

  def same(self, x, y):
        return self.find(x) == self.find(y)

  def roots(self):
    return [i for i, x in enumerate(self.parents) if x < 0]

  def members(self, x):
    root = self.find(x)
    return [i for i in range(self.n) if self.find(i) == root]

  def __str__(self):
    return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

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

A = [0]*M
B = [0]*M
for i in range(M):
  A[i],B[i] = map(int, input().split())
  A[i] -= 1
  B[i] -= 1

ans = []

A = A[::-1]
B = B[::-1]
uf = UnionFind(N)
total = N*(N-1)//2
ans.append(total)
for i in range(M):
  if uf.same(A[i],B[i]):
    ans.append(total)
    continue
  m = abs(uf.parents[uf.find(A[i])])
  n = abs(uf.parents[uf.find(B[i])])
  
  #print(A[i]+1,m,B[i]+1,n)
  uf.union(A[i],B[i])
  total -= m*n
  ans.append(total)
  
#print(ans)   

print(*ans[:-1][::-1], sep='\n')


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

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

a,b,c = map(int,input().split())
n = int(b/a)
if n < c:
  print(n)
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):
# coding: UTF-8
import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

def find(x):
    if node[x] < 0:
        return x
    else:
        node[x] = find(node[x])
        return node[x]

def unite(x, y):
    x = find(x)
    y = find(y)
    ret = False
    if x != y:
        ret = True
        if rank[x] > rank[y]:
            node[x] += node[y]
            node[y] = x
        else:
            node[y] += node[x]
            node[x] = y
            if rank[x] == rank[y]:
                rank[y] += 1
    return ret

def is_same(x, y):
    return find(x) == find(y)

def size(x):
    return -node[find(x)]

n, m = map(int,input().split())
node = [-1 for i in range(n + 1)]
rank = [0 for i in range(n + 1)]
e = [[int(i) for i in input().split()] for i in range(m)]
ans = deque()
num = int((n * (n - 1)) // 2)
s = 0
for i in e[::-1]:
    s1 = size(i[0])
    s2 = size(i[1])
    ans.appendleft(num)
    if unite(i[0], i[1]):
        num -= s1 * s2
for i in ans:
    print(i)


# coding: UTF-8
import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

cnt = 0
for i in range(c):
    if b >= a:
        cnt += 1
        b -= a
    else:
        break
print(cnt)





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):
in_s = input().rstrip()
lst = list(in_s)
cur=0
while True:
    if cur+1 >= len(lst):
        break
    if lst[cur]!=lst[cur+1]:
        del lst[cur+1]
        del lst[cur]
        cur = max(0,cur-1)
    else:
        cur+=1

print(len(in_s) - len(lst))

a,b,c = [int(s) for s in 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())

count = a // b

if count < c:
  print(count)
else:
  print(c)

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

count = b // a

if count < c:
  print(count)
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())
max=a*c
if b >= max:
    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())
D=B//A
if D<=C:
    print(C)
else:
    print(D)

A,B,C=map(int, input().split())
D=B//A
if D<=C:
    print(D)
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):
x, y, z = map(int, input().split())
if y // x >= z:
    print("z")
else:
    print(y//x)


x, y, z = map(int, input().split())
if y // x >= z:
    print(z)
else:
    print(y//x)


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

A,B,K=map(int,input().split())
l=[]
p=A
q=B
if A>B:
    A=q
    B=p
for i in range(1,B+1):
    if A%i==0 and B%i==0:
        l.append(i)

print(l[K-1])


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

A, B, C = map(int, input().split())
if (B // A) > C:
    ans = C
else:
    ans = B // A
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):
l = list(map(int, input().split()))
l1 = []
a, b, c = l[0], l[1], l[2]
m = min(a,b)

for i in range(1, m+1):
  if a%i==0 and b%i==0:
    l1.append(i)

print(sorted(set(l1))[c-1])

l = list(map(int, input().split()))
l1 = []
a, b, c = l[0], l[1], l[2]
m = min(a,b)

for i in range(1, m+1):
  if a%i==0 and b%i==0:
    l1.append(i)

print(sorted(set(l1))[c-1])

l = list(map(int, input().split()))
a, b, c = l[0], l[1], l[2]

if b/a>c:
  print(c)
else:
  print(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):
n,m = map(int,input().split())
isl1 = [0]*m
isl2 = [0]*m
for i in range(m):
    (isl1[i], isl2[i]) = map(int,input().split())
    isl1[i] -= 1
    isl2[i] -= 1
boss = [-1]*n
mem = [1]*n
dpt = [0]*n
ans = [0]*m
s = (n*(n-1))//2
ans[m-1] = s
 
def sea(i, boss):
     m = 0
     while boss[i] >= 0:
          i = boss[i]
          m += 1
     return i,m
 
for j in range(m-1):
     i = m-j-1
     i1,i2 = isl1[i],isl2[i]
     p1,m1 = sea(i1, boss)
     p2,m2 = sea(i2, boss)
     if p1 != p2:
          if dpt[m1] < dpt[m2]:
               (p1,p2) = (p2,p1)
          boss[p2] = p1
          s -= mem[p1]*mem[p2]
          mem[p1] += mem[p2]
          mem[p2] = 0
          dpt[p1] = max(dpt[p1],dpt[p2]+1)
     ans[i-1] = s
         
for i in range(m):
     print(ans[i])

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())
i = 0
while i < C or i < int B/A:
    i += 1
print(i)

A,B,C = map(int,input().split())
i = 0
while i < C and i < int(B/A):
    i += 1
print(i)

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(C)
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):
a, b, c = map(input().split())
print(min(c, b//a))




#include <cstdio>
using namespace std;

int main(){
  //入力
  int A, B, C;
  cin >> A >> B >> C;

  //処理
  int ans = B / A;
  if (ans > C) ans = C;

  //出力
  cout << ans << endl;
}


a, b, c = map(int, input().split())
print(min(c, 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
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())

A, B, C = tuple(li())
times = B // A
print(min(A, C))


import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())

A, B, C = tuple(li())
times = B // A
print(min(times, 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())
print(min(b/a,c))

a=int(input())
b=int(input())
c=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):
import sys

args = []

args.append(int(input()))
args.append(int(input()))
args.append(int(input()))

result = int(args[1] / args[0])
if result > args[2]:
    result = args[2]
print(result)


import sys

strings = str(input())
strings_list = []
for s in strings:
    strings_list.append(s)



flag = 1
num = 0
while flag == 1:
    flag = 0
    for i in range(len(strings_list) - 1):
        if strings_list[i] != strings_list[i + 1]:
            del strings_list[i+1], strings_list[i]
            num += 2
            flag = 1
            break

print(num)


import sys

args = sys.argv

result = int(int(args[2]) / int(args[1]))
if result > int(args[3]):
    result = int(args[3])
print(result)


import sys

strings = str(input())
strings_list = []
for s in strings:
    strings_list.append(s)



flag = 1
num = 0
middle = 0
while flag == 1:
    flag = 0
    for i in range(middle, len(strings_list) - 1):
        if strings_list[i] != strings_list[i + 1]:
            del strings_list[i+1], strings_list[i]
            num += 2
            flag = 1
            break

print(num)


import sys

args = sys.argv

result = int(int(args[2]) / int(args[1]))
if result > int(args[3]):
    result = int(args[3])
print(result)


import sys

args = []
args[0] = int(input())
args[1] = int(input())
args[2] = int(input())

result = int(args[1]) / args[0])
if result > args[2]:
    result = args[2]
print(result)


import sys


args = str(input()).split(" ")

result = int(int(args[1]) / int(args[0]))
if result > int(args[2]):
    result = int(args[2])
print(result)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

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 math
A,B,K=map(int,input().split())
d=[]
if math.gcd(A,B)==1:
    d.append(1)
else:
    for i in range(2,math.gcd(A,B)+1):
        if A%i==0 and B%i==0:
            d.append(i)
print(d[len(d)-K])

import math
A,B,K=map(int,input().split())
d=[]
for i in range(1,max(A,B)+1):
    if A%i==0 and B%i==0:
        d.append(i)
print(d[len(d)-K])

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

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

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


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

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

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


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

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):
S = []
ans = 0
for c in input():
    if (len(S) > 0) and (c != S[-1]):
        S.pop()
        ans += 2
    else:
        S.append(c)
print(ans)


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

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

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

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

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

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

A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(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):
# -*- coding: utf-8 -*-

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


if a*c >= b:
	output = c

else:
	output = b // a

print(output)

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

price, money, satis = map(int, input().split())


if price * satis <= money:
	output = satis

else:
	output = money // price

print(output)

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 >= c:
    print(c)
else:
    print(d)

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

count = b // a
if count < c:
    print(count)
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):
S = list(input())
N = len(S)

c=0
i=0
f=0
while(1):
    if S[i] != S[i+1]:
        del S[i:i+2]
        c+=2
        N-=2
        i-=1
        f=1
    if N<2:
        break
    i+=1
    if i+1 == N:
        i=0
        if f==0:
            break
        f=0
    print(i,N,S,f)
print(c)

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

a=int(a)
b=int(b)
c=int(c)

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

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

a=int(a)
b=int(b)
c=int(c)

res=0
if b/a > c:
    res=c
else:
    res=b/a

print(int(res))

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(min(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):
A, B, C = map(int, input().split())

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

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

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

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

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


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


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


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


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())
cnt = 0

while A <= B:
  B = B - A
  
  if cnt >= C
    break
  cnt+=1
print(cnt)

A, B, C = map(int, input().split())
cnt = 0
 
while A <= B:
  B = B - A
  
  if cnt >= C:
    break
  cnt+=1
print(cnt)

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):
data = input().split()
n = int(data[0])
m = int(data[1])
edge=[]
for i in range(m):
    tmp = []
    data = input().split()
    tmp.append(int(data[0])-1)
    tmp.append(int(data[1])-1)
    edge.append(tmp)

grp=list(range(0, n))
def group(num):
    if grp[num] == num:
        return num
    return group(grp[num])

def merge(num1, num2):
    grp[num2]=grp[num1]

res=[]
ans = [1]*n
ben = int(n*(n-1)/2)
edge.reverse()
for e in edge:
    
    res.append(ben)
    g0 = group(e[0])
    g1 = group(e[1])
    if g0 != g1:
        ben -= ans[g0]*ans[g1]
        sum = ans[g0]+ans[g1]
        merge(g0, g1)
        ans[g0]=sum
        ans[g1]=sum

res.reverse()
for r in res:
    print(r)

#print(int(n*(n-1)/2))

data = input().split()
a = int(data[0])
b = int(data[1])
c = int(data[2])

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

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

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

a, b, c = list(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())
j=0
for i in range(100,0):
  A=a%i
  B=b%i
  if A==0:
    if B==0:
      j+=1
      print(i)
  if j==k:
    print(i)
    break

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):
#Coding: Utf-8
N=input()

A=N.count("1")
B=N.count("0")
if A==0 or B==0:
  print(0)
  exit()

print(min(A,B)*2)

#Coding:Utf-8

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

if math.floor(B/A)>C:
    print(C)
else:
    print(math.floor(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=int(input())
B=int(input())
C=int(input())
if A*C<=B:
    print(C)
else:
    n=B//A
    print(n)

A=int(input())
B=int(input())
C=int(input())
if A*C<=B:
    print(C)
else:
    n=B//A
    print(n)

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

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

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


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

if b//a >= c:
  print(c)
elif:
  print(b//a)

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

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

if a * c <= b:
    print(c)
elif a > b:
    print(0)
elif a * c >b:
    print(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 = map(int, input())
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())
A = b/a
if A<c:
  ans = A
else:
  ans = c
print(ans)

a,b,c = map(int, input().sprit())
A = b/a
if A<c:
  ans = A
else:
  ans = c
print(ans)

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

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

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

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

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(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):
import sys

l = []
for line in sys.stdin:
  l.append([int(i) for i in line.split()])

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

import sys
 
l = []
for line in sys.stdin:
  l.append([int(i) for i in line.split()])
 
a, b, c = l[0]
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,c)

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: 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):
input = input().split()

intInput = [int(i) for i in input]

result = 0


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

elif(intInput[0]>intInput[1]):
	print(0)

else:
	for i in range(intInput[2]):
		result = result + intInput[0]
		if(intInput[1] - result < intInput[0]):
			print(i+1)
			break

input = input().split()

intInput = [int(i) for i in input]

result = 0


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

elif(intInput[0]>intInput[1]):
	print(0)

else:
	for i in range(intInput[2]):
		result = result + intInput[0]
		if(intInput[1] - result < intInput[0]):
			print(i+1)
			break

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(A*C)
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):
a, b, c = map(int, input().split())
print(min(n//a, c))

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

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: 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(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, C = [int(_) for _ in input().split()]
print(min([A // B, C]))


A, B, C = [int(_) for _ in 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(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 = [int(i) for i in input().split()]

if a%b > c:
    print(c)
else:
    print(a%b)


import scipy as sp


def divisor(num):
    list = set()
    for i in sp.arange(1, num+1):
        if num % i == 0:
            list.add(i)
    return list


a, b, k = [int(i) for i in input().split()]

div_a = divisor(a)
div_b = divisor(b)

cd = sp.sort(list(div_a & div_b))
cd_r = cd[::-1]
print(cd_r[k-1])


a, b, c = [int(i) for i in 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):
import sys

for line in sys.stdin:
    print(line.strip().split())

import sys, math

stdout_write = sys.stdout.write

for line in sys.stdin:
  a, b, c = (int(i) for i in line.strip().split())
  ans = min(int(math.floor(b / a)), c)
  stdout_write('{}\n'.format(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):
a,b,c=[int(s)for s in input().split()]
print(max((b//a,c)))

a,b,c=[int(s)for s in 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):
n=input().split()
a=int(n[0])
b=int(n[1])
c=int(n[2])
k=b//n
if k>c:
  print(c)
else:
  print(k)

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

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


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

yakusuu_array = []

for ab in [a,b]:
    yakusuu_array_ab = []
    for i in range(1,ab):
        if ab % i == 0:
            yakusuu_array_ab.append(i)
    yakusuu_array.append(yakusuu_array_ab)

kouyakusuu = list(set(yakusuu_array[0]) & set(yakusuu_array[1]))

if len(kouyakusuu) == 0:
    print(1)
else:
    print(kouyakusuu[k-1])


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


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

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

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



Verdicts: Runtime Error

Accepted