Problem:


Score : 100 points

Problem Statement

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?

Constraints

All values in input are integers.

1 \leq A, B, C \leq 100

Input

Input is given from Standard Input in the following format:

A B C

Output

Print the number of times Takahashi will hear his favorite sound.

Sample Input 1

2 11 4

Sample Output 1

4

Since he has not less than 8 yen, he will hear the sound four times and be satisfied.

Sample Input 2

3 9 5

Sample Output 2

3

He may not be able to be satisfied.

Sample Input 3

100 1 10

Sample Output 3

0



Sample input:
2 11 4


Sample output:
4

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
divisers = []

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

print(divisers[-k])

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
divisers = []

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

print(divisers[-k])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(c)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    int A, B, C;
    cin >> A >> B >> C;
    cout << min(B/A, C) << endl;

    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
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)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
hoge=[]

for i in range(1,101):
  if (A%i == 0 and B%i ==0):
    hoge.append(i)

print(hoge[K-1])

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
num = max(A, B)
a = [1]
cnt = 1
for i in range(1,num):
  if A % i == 0 and B % i == 0:
    cnt += 1
    a.append(i)
a.sort(reverse=True)
print(a[K])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def find(tab, a):
    try:
        if tab[0][a]==-1:
            return a
        tab[0][a] = find(tab, tab[0][a])
        return tab[0][a]
    except:
        pass

def union(tab, a, b):
    p1, p2 = find(tab, a), find(tab, b)
    if p1 != p2:
        tab[0][p1] = p2
        tab[1][p2] += tab[1][p1]

def size(tab, a):
    return tab[1][a]

N, M = [int(a) for a in input().split(" ")]
ABs = [[int(a) for a in input().split(" ")] for i in range(M)]
tab = [[-1]*N, [1]*N]
arr = []



for a, b in reversed(ABs):
    a, b = a-1, b-1
    pa, pb = find(tab, a), find(tab, b)
    na, nb = size(tab, pa), size(tab, pb)
    if pa!=pb:
        dn = ((na+nb)*(na+nb-1)//2)-(na*(na-1)//2)-(nb*(nb-1)//2)
        arr.append(dn)
        union(tab, a, b)
    else:
        arr.append(0)

acc = 0
for cp in reversed(arr):
    acc += cp
    print(acc)

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
if A*C =<B:
  print("C")
else:
  print(B % A)

Submission status: Runtime Error

Solution code:
def largest_common_divisor(a,b):
  if a==b: return a
  elif a>b:
    tmp = 1
    while tmp!=0:
      tmp = a%b
      a = b
      b = tmp
    return a
  elif a<b:
    tmp = 1
    while tmp!=0:
      tmp = b%a
      b = a
      a = tmp
    return b

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

Submission status: Runtime Error

Solution code:
def largest_common_divisor(a,b):
  if a==b: return a
  elif a>b:
    tmp = 1
    while tmp!=0:
      tmp = a%b
      a = b
      b = tmp
    return a
  elif a<b:
    tmp = 1
    while tmp!=0:
      tmp = b%a
      b = a
      a = tmp
    return b
if __name__=="__main__":
  largest = largest_common_divisor(A,B)
  count = 0
  for i in range(1,largest+1):
    if largest%i==0:
        count+=1
        if count == target:
            return i

Submission status: Runtime Error

Solution code:
[A,B,C]=list(map(int,input().sprit))

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

Submission status: Runtime Error

Solution code:
K = int(input())

if K % 2:
    print((K // 2) * (K // 2 + 1))
else:
    print((K // 2)**2)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define all(x) x.begin() , x.end()
#define ll long long 
#define pb push_back
#define mp make_pair


using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a , b , c; cin>>a>>b>>c;
    cout<<min(c , b / a);

}

Submission status: Runtime Error

Solution code:
print(hello)

Submission status: Runtime Error

Solution code:
in = input().split()

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

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

Submission status: Runtime Error

Solution code:
a=int(input())
b,c=map(int, input().split())
s=input()
print("{} {}".format(a+b+c,s))

Submission status: Runtime Error

Solution code:
N, M = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]

roots = [(i,1) for i in range(N+1)] # root, num_islands_in_group

inconveniences = [0]*(M+1)
inconveniences[-1] = N*(N-1)//2 #すべての橋が崩落するとNC2

def find_root(a, roots=roots):
  if roots[a][0] == a:
    return roots[a]
  else:
    roots[a] = find_root(roots[a][0])
  return roots[a]

def reduce_inconvenience_with_unite(a, b, roots=roots):
  root_a, n_a = find_root(a)
  root_b, n_b = find_root(b)
  if root_a == root_b:
    return 0
  else:
    if n_a > n_b:
      roots[root_a] = (root_a, n_a + n_b)
      roots[root_b] = (root_a, n_a + n_b)
    else:
      roots[root_a] = (root_b, n_a + n_b) 
      roots[root_b] = (root_b, n_a + n_b)
    return n_a * n_b

for i, ab in enumerate(AB[:0:-1]): #実は1個めの橋は全く関係ない
  a, b = ab
  inconveniences[M-1-i] = inconveniences[M-i] - reduce_inconvenience_with_unite(a,b)

for inc in inconveniences[1:]:
  print(inc)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c;cin>>a>>b>>c;
  cout << min(b/a,c)<<endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,C = [int(v) for v in input().split()]
print(max(A//B,C)

Submission status: Runtime Error

Solution code:
a=list(map(int, input().split().split()))

if a[1]//a[0]>=a[2]:
    print(a[2])
else:
    print(a[1]//a[0])

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
cnt = 0

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

Submission status: Runtime Error

Solution code:
a,b,c = map(int(i) for i in input().split())
if int(b/a) >= c:
  print(c)
else:
  print(int(i/a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

Solution code:
list = raw_input().split()

A = int(list[0])

B = int(list[1])

c = int(list[2])

if B // A < C:
    print B // A

else:
    print C

Submission status: Runtime Error

Solution code:
list = raw_input().split()

A = list[0]

B = list[1]

c = list[2]

if B // A < C:
    print B // A

else:
    print C

Submission status: Runtime Error

Solution code:
A, B, K = map(int,input().split())
listAB = []
for i in range(min(A,B)):
    if A%(i+1) == 0 and B % (i+1) == 0:
        listAB.append(i+1)
listAB.sort(reverse = True)
if A == 1 or B == 1:
    print(1)
else:
    print(listAB[K-1])

Submission status: Runtime Error

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

a = A
b = b
count = 0
if a > b:
    print(0)

while b - a >= 0:
    if count == C:
        break
    b -= a
    count += 1

print(count)

Submission status: Runtime Error

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

a = A
b = b
count = 0
if a > b:
    print(0)

while b - a >= 0:
    if count <= C:
        break
    b -= a
    count += 1

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding:utf-8

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

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

else:
	print(b/a)

Submission status: Runtime Error

Solution code:
#coding:UTF-8

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

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

Submission status: Runtime Error

Solution code:
#coding:UTF-8

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
a, b, c=map(int, input().split())
if a * c <= b:
  print(c)
else:
  print(floor(b / a))

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
i = a + 1 if a <= b else b + 1
count = 0
while count < k:
    i -= 1
    if a % i == 0 and b % i == 0:
        count += 1
print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split()))
CD = []
for i in range(1, min(x[0], x[1])+1):
    if x[0] % i == 0 and x[1] % i == 0:
        CD.append(i)
print(CD[1])

Submission status: Runtime Error

Solution code:
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,

Submission status: Runtime Error

Solution code:
"""B - K-th Common Divisor"""
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])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
n = min(B / A, C)
print n

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
class UnionFind():
    def __init__(self, n):
        self.__parent = [i for i in range(n)]
        self.size = [1 for _ in range(n)]

    def union(self, x, y):
        pX, pY = self.find(x), self.find(y)
        if pX != pY:
            if pX < pY:
                self.__parent[pY] = pX
                self.size[pX] += self.size[pY]
            else:
                self.__parent[pX] = pY
                self.size[pY] += self.size[pX]                                                                 

    def find(self, x):
        if self.__parent[x] != x:
            self.__parent[x] = self.find(self.__parent[x])
        return self.__parent[x]

N, M = map(int, input().split())
bridge = [tuple(map(lambda x: int(x) - 1, input().split())) for _ in range(M)]
uf = UnionFind(N)
num_disconnect = int(N*(N-1)/2)
ans = []
for a, b in reversed(bridge):
    ans.append(num_disconnect)
    pA, pB = uf.find(a), uf.find(b)
    if pA != pB:
        num_disconnect -= uf.size[pA] * uf.size[pB]
    uf.union(a, b)

for i in reversed(ans): print(i)

Submission status: Runtime Error

Solution code:
A_B_C = [int(x.strip()) for x in input().split()]
print(A_B_C = [int(x.strip()) for x in input().split()])

Submission status: Runtime Error

Solution code:
N, M = list(map(int,input().split()))
A = []
B = []
for i in range(M):
    A1,B1=[int(i) for i in input().split()]
    A.append(A1)
    B.append(B1)
A.reverse()
B.reverse()

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n+1)]
        self.rank = [0 for _ in range(n+1)]
        self.size = [1 for _ in range(n+1)]
    
    def find(self, x):
        """
        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 と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            x_size = self.size[x]
            y_size = self.size[y]
            sum_size = x_size + y_size
            self.size[x] = sum_size
            self.size[y] = sum_size
            
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)
    
    def get_size(self, a):
        x = self.find(a)
        return self.size[x]
      
uf = UnionFind(N)
anses = []
ans = N * (N-1) // 2
anses.append(ans)

for k in range(len(A)-1):
    if uf.is_same(A[k], B[k]):
        anses.append(anses[k])
        print(anses)
    else:
        N1 = uf.get_size(A[k])
        N2 = uf.get_size(B[k])
        ans = anses[k] - (N1 * N2)
        if ans < 0:
            ans = 0
        uf.union(A[k], B[k])
        anses.append(ans)
        
for ans in reversed(anses):
        print(ans)

Submission status: Runtime Error

Solution code:
N, M = list(map(int,input().split()))
A = []
B = []
for i in range(M):
    A1,B1=[int(i) for i in input().split()]
    A.append(A1)
    B.append(B1)
A.reverse()
B.reverse()

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n+1)]
        self.rank = [0 for _ in range(n+1)]
        self.size = [1 for _ in range(n+1)]
    
    def find(self, x):
        """
        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 と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            x_size = self.size[x]
            y_size = self.size[y]
            sum_size = x_size + y_size
            self.size[x] = sum_size
            self.size[y] = sum_size
            
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)
    
    def get_size(self, a):
        x = self.find(a)
        return self.size[x]
      
uf = UnionFind(N)
anses = []
ans = int(N * (N-1) / 2)
anses.append(ans)

for k in range(len(A)-1):
    if uf.is_same(A[k], B[k]):
        anses.append(anses[k])
        print(anses)
    else:
        N1 = uf.get_size(A[k])
        N2 = uf.get_size(B[k])
        ans = anses[k] - (N1 * N2)
        if ans < 0:
            ans = 0
        uf.union(A[k], B[k])
        anses.append(ans)
        
for ans in reversed(anses):
        print(ans)

Submission status: Runtime Error

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

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

print(min(C,s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
a = int(input())#一回にかかる料金
b = int(input())#所持している金額
c = int(input())#満足する回数
if b//a > c:
    print(c)
else:
    print(b//c)

Submission status: Runtime Error

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

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

count = 0
ans = 0

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

print(ans)

Submission status: Runtime Error

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

if ans > C:
	ans = C

print(ans)

Submission status: Runtime Error

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

if ans > C:
	ans = C

print(ans)

Submission status: Runtime Error

Solution code:
def main120():
    import sys
    S_org = input()
    S = []

    for s in range(len(S_org)):
        S.append(S_org[s])
    S = list(map(int, S))

    cont = True
    index = 0
    count = 0

    if len(S) == 1:
        print(0)
        sys.exit()

    else:
        while(cont):
            print(index)
            if S[index] == S[index+1]:
                index += 1
            else:
                count += 2
                S.pop(index)
                S.pop(index)
                if index > 0:
                    index -= 1

            if index == len(S) - 2:
                if S[index] != S[index+1]:
                    count += 2
                print(count)
                sys.exit()


main120()

Submission status: Runtime Error

Solution code:
sn,bn=map(int,input().split(" "))
fu=[int(sn*(sn-1)/2)]
gr_si=[n for n in range(sn+1)]
siL_gr=[[n] for n in range(sn+1)]
siL_br=[]
for _ in range(bn):
    siL_br.append(list(map(int, input().split(" "))))
siL_br=siL_br[::-1]

for bri in range(bn-1):
    si1,si2=siL_br[bri]
    gr1 = gr_si[si1]
    gr2 = gr_si[si2]
    if gr1==gr2:
        fu.append(fu[bri])
    else:
        lengr1 = len(siL_gr[gr1])
        lengr2 = len(siL_gr[gr2])
        if lengr1<lengr2:
            gr1,gr2=gr2,gr1
        fu.append(fu[bri]-lengr1*lengr2)
        for si in siL_gr[gr2]:
            gr_si[si]=gr1
        siL_gr[gr1]+=siL_gr[gr2]

print(*fu[::-1],sep="\n")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,C = (int(i) for in input().split())
sho=B//A

if sho >= C :
    print(C)
else:
    print(sho)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define For(i, a, b) for (int i = (a); i <= static_cast<int>(b); i++)
#define Forr(i, a, b) for (int i = (a); i >= static_cast<int>(b); i--)
#define rep(i, n) For(i, 0, n - 1)
#define repall(i, arr) for (auto& i : (arr))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define dump(x) cerr << #x << " = " << (x) << '\n'

template <typename T>
using pq = priority_queue<T>;
template <typename T>
using pqr = priority_queue<T, vector<T>, greater<T>>;
const int INF = INT_MAX / 2;
constexpr int MOD = 1e9 + 7;
using P = pair<int, int>;
using vec = vector<int>;
using mat = vector<vec>;

template <typename T1, typename T2>
ostream& operator<<(ostream& stream, const pair<T1, T2>& p) {
    return stream << p.first << " " << p.second;
}
template <typename T>
void print(const vector<vector<T>> matrix) {
    repall (vec, matrix)
        print(vec);
}
template <typename T>
void print(const vector<T> vec) {
    unsigned int len = vec.size();
    rep (i, len - 1)
        cout << vec[i] << ' ';
    cout << vec[len - 1] << '\n';
}
template <typename Arg>
void print(const Arg arg) {
    cout << arg << '\n';
}
template <typename Head, typename... Args>
void print(const Head head, const Args... args) {
    cout << head << " ";
    print(args...);
}
template <typename T>
T sum_(vector<T> vec, T init = 0) {
    return std::accumulate(all(vec), T(init));
}

void yn(bool tf) { print(tf ? "Yes" : "No"); }
void YN(bool tf) { print(tf ? "YES" : "NO"); }

template <typename T>
void init(vector<T>& v) {
    rep (i, v.size())
        cin >> v[i];
}

template <typename T, typename U>
void init(vector<T>& v, vector<U>& w) {
    assert(v.size() == w.size());
    rep (i, v.size())
        cin >> v[i] >> w[i];
}

int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
// -------------------------------------------------------------------
// sort 1 2 3 4

signed main() {
    cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);

    int a, b, c;
    cin >> a >> b >> c;

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

    return 0;
}

Submission status: Runtime Error

Solution code:
cost, money, enogh = map(int, input().split())

times = money // cost
if(times > enough):
    print(enough)
else:
    print(times)

Submission status: Runtime Error

Solution code:
ABC=input().split()#2 11 4
A=int(A);B=int(B);C=int(C)
count=0
while A<=B:
    count+=1
    B=B-A
if count<C:
    print(str(count))
else:
    print(str(C))

Submission status: Runtime Error

Solution code:
L = list(input())
L_ = []
a = L.pop(0)
cnt = 0

while True:
    if len(L) == 0:
        break
    else:
        b = L.pop(0)
    if a is not b:
        cnt += 1
        # L = L_ + L
        # L_ = []
        a = L_.pop(0)
    elif a is b:
        L_.append(a)
        a = b
    # print(L_, a,  L)

print(cnt * 2)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def main():
    A=int(input())
    B=int(input())
    C=int(input())
    if (A/B) < C:
        print(int(B/A))
    else:
        print(C)

main()

Submission status: Runtime Error

Solution code:
a, b, c = map(input().split())
print(min(c, b//a))

Submission status: Runtime Error

Solution code:
info = input().split(' ')
num_one = int(info[0])
num_two = int(info[1])
num_class = int(info[2])
one_list = [i for i in range(1,num_one + 1) if num_one % i == 0]
two_list = [i for i in range(1,num_two + 1) if num_one % i == 0]
one_set = set(one_list)
two_set = set(two_list)
match_set = one_set & two_set
match_list = list(match_set)
match_list.sort()
print(match_list[num_class-1])

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(x[-k])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
print(min(B//A), C)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().spit())

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

Submission status: Runtime Error

Solution code:
return math.min(math.floor(A/B), C)

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()

print (a)
print (b)
print (c)

Submission status: Runtime Error

Solution code:
class Union_find(object):
    def __init__(self, N):
        #親の番号を格納する。親だった場合は-(その集合のサイズ)
        self.parent = [-1]*(N)
    #Aがどのグループに属するか
    def root(self, A):
        if self.parent[A] < 0:
            return A
        else:
            #親を繋ぎ変えて高速化
            self.parent[A] = self.root(self.parent[A])
            return self.parent[A]
    def size(self, A):
        return -self.parent[self.root(A)]
    # A,Bをくっつける
    def connect(self, A, B):
        # A,Bを直接つなぐのでなく、root(A),root(B)をつなぐ
        A = self.root(A)
        B = self.root(B)
        if A == B:
            return False
        # 大きい方に小さい方をくっつける
        if self.size(A) < self.size(B):
            A, B = B, A
        self.parent[A] += self.parent[B]
        self.parent[B] = A
        return True

N, M = list(map(int, input().split()))
A = []
B = []
for _ in range(M):
    a, b = list(map(int, input().split()))
    A.append(a-1)
    B.append(b-1)
uni = Union_find(N)
result = []
unconv = int(N*(N-1)/2)
for a, b in zip(reversed(A), reversed(B)):
    result.append(unconv)
    size_a = uni.size(a)
    size_b = uni.size(b)
    if uni.connect(a, b):
        unconv -= size_a*size_b
for r in reversed(result):
    print(r)

Submission status: Runtime Error

Solution code:
a,b,c = input()

d = int(b/a)

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

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
while A<1 or A>100 or B<1 or B>100 or C<1 or C>100:
	A=int(input())
    B=int(input())
    C=int(input())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
while A<1 or A>100 or B<1 or B>100 or C<1 or C>100:
	A=int(input())
    B=int(input())
    C=int(input())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
while A<1 or A>100 or B<1 or B>100 or C<1 or C>100:
 A=int(input()),B=int(put()),C=int(input())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)

Submission status: Runtime Error

Solution code:
A=int(input()),B=int(put()),C=int(input())
while A<1 or A>100 or B<1 or B>100 or C<1 or C>100:
 A=int(input()),B=int(put()),C=int(input())
D=B//A-C
if D>0:
  print(C)
else:
  print(B//A)

Submission status: Runtime Error

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

def divlist(x):
  numbers = []
  divX = []
  try:
    for i in range(1,x+1):
      numbers.append(i)
      if x % i == 0:
        divX.append(i)
    divX = set(divX)
    return divX
  except ZeroDivisionError:
      print("ZeroDivisionError!!")

divA = divlist(A)
divB = divlist(B)
common = sorted(list(divA & divB))

#print("divA:", divA)
#print("divB:", divB)
#print("divC:", common)
print(common[K-1])

Submission status: Runtime Error

Solution code:
a,b,c = map(int,Input.split())

if a * c <= b:
    print(c)
elif a > b:
    print(0)
elif a * c >b:
    print(a)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
print([i for i in range(1,101) if a%i+b%i<1][-k])

Submission status: Runtime Error

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

coin_sound_cnt = B//A
if coin_sound_cnt > C:
  return C
else:
  return coin_sound_cnt

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input())

coin_sound_cnt = B//A
if coin_sound_cnt > C:
  return C
else:
  return coin_sound_cnt