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:
#!/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()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print(min(b//a,c))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
s_a = [int(input()) for i in range(N)]
s_b = [0]
s = s_b + s_a
x = 0
y = 0
j = 0

for v in range(N + 1):
    c  = s.count(v)
    if c == 0:
        x = x + v
    if c == 2:
        y = y + v
    if c == 1:
        j = j + 1

if j == N + 1:
    print("Correct")
else:
    print(str(y) + " " + str(x))

Submission status: Runtime Error

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

ans =[]
for i in range(1,100):
  if (A % i)== 0 and (B % i) == 0:
    ans.append(i)

ans_sort = ans[::-1]
print(ans_sort[K-1])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
mod = 10 ** 9 + 7
mod2 = 2 ** 61 + 1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

_NUMINT_ALL = list(range(10))


def main():
    ans = solve()

    if ans is True or ans is False:
        YesNo(ans)
    elif ans is not None:
        print(ans)

class UfNode():
    def __init__(self, id):
        self.parent = None
        self.id = id
        self._size = 1

    @property
    def size(self):
        if not self.parent:
            return self._size
        else:
            return self.root()._size

    def root(self):
        if not self.parent:
            return self
        else:
            return self.parent.root()

    def sizeup(self, n):
        if not self.parent:
            self._size += n
        else:
            self.root().sizeup(n)

    def unite(self, target):
        sr = self.root().id
        tr = target.root().id
        if sr == tr:
            return False
        elif sr > tr:
            target.sizeup(self.size)
            self.root().parent = target.root()
        else:
            self.sizeup(target.size)
            target.root().parent = self.root()

class UfTree():
    def __init__(self, maxnum):
        self.parent = [None for _ in range(maxnum)]
        self._size = [1 for _ in range(maxnum)]
        self.rank = [0 for _ in range(maxnum)]

    def size(self, a):
        return self._size[self.root(a)]

    def root(self, a):
        rank = 0
        cur = a
        path = []
        while True:
            if self.parent[cur] is None:
                for i in path: # 経路圧縮
                    self.parent[i] = cur
                return cur
            else:
                path.append(cur)
                cur = self.parent[cur]
                rank += 1

    def unite(self, a, b):
        ra = self.root(a)
        rb = self.root(b)
        if ra == rb:
            return self

        self._size[ra] += self._size[rb]
        self.parent[rb] = ra
        return self


def solve():
    N, M = iip(False)
    AB = iipt(M)
    AB.reverse()

    nroot = {}

    uf = UfTree(N)
    benlist = [0]

    cur = 0
    for a, b in AB:
        a -= 1
        b -= 1
        c1 = uf.size(a)
        c2 = uf.size(b)
        uf.unite(a, b)
        if c2 != uf.size(a):
            cur += c1*c2
        benlist.append(cur)

    t = benlist.pop()
    benlist.reverse()
    #print(benlist)

    ans = [t - i for i in benlist]
    split_print_enter(ans)




#####################################################ライブラリ集ここから

def kiriage_warizan(a, b):
    return -(-a//b)


def iip(listed=True):  # 数字のinputをlistで受け取る
    d = input().split()
    try:
        ret = [int(i) for i in d]
    except:
        ret = [int(i) if i in _NUMINT_ALL else i for i in d]
        if len(ret) == 1:
            return ret[0]

    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def iipt(l, listed=False, num_only=True):  # 縦向きに並んでいるデータをリストに落とし込む(iip利用)
    ret = []
    for i in range(l):
        ret.append(iip(listed=listed))
    return ret


def saidai_kouyakusuu(A):  # 最大公約数
    l = len(A)
    while True:
        m = min(A)
        mx = max(A)
        if m == mx:
            return m

        for i in range(l):
            if A[i] % m == 0:
                A[i] = m
            else:
                A[i] %= m


def make_graph_edge_flat(N):  # グラフ作成のための辺をリストで返す
    ret = []
    for i in range(N-1):
        a, b, c = iip()
        a -= 1
        b -= 1
        ret[a].append((b, c))
        ret[b].append((a, c))
    return ret


def sort_tuples(l, index):  # タプルのリストを特定のインデックスでソートする
    if isinstance(l, list):
        l.sort(key=lambda x: x[index])
        return l
    else:
        l = list(l)
        return sorted(l, key=lambda x: x[index])


def count_elements(l):  # リストの中身の個数を種類分けして辞書で返す
    d = {}
    for i in l:
        if i in d:
            d[i] += 1
        else:
            d[i] = 1
    return d


def safeget(l, index, default="exception"):  # listの中身を取り出す時、listからはみ出たり
    if index >= len(l):                      # マイナスインデックスになったりするのを防ぐ
        if default == "exception":
            raise Exception("".join(["safegetに不正な値 ", index, "が渡されました。配列の長さは", len(l), "です"]))
        else:
            return default
    elif index < 0:
        if default == "exception":
            raise Exception("".join(["safegetに不正な値 ", index, "が渡されました。負の値は許可されていません"]))
        else:
            return default
    else:
        return l[index]


def sortstr(s):  # 文字列をソートする
    return "".join(sorted(s))


def iip_ord(startcode="a"):  # 文字列を数字の列に変換する(数字と文字は1:1対応)
    if isinstance(startcode, str):
        startcode = ord(startcode)
    return [ord(i) - startcode for i in input()]


def YesNo(s):  # TrueFalseや1, 0をYesNoに変換する
    if s:
        print("Yes")
    else:
        print("No")


def fprint(s):  # リストを平たくしてprintする(二次元リストを見やすくしたりとか)
    for i in s:
        print(i)


def bitall(N):  # ビット全探索用のインデックスを出力
    ret = []
    for i in range(2 ** N):
        a = []
        for j in range(N):
            a.append(i % 2)
            i //= 2
        ret.append(a)
    return ret

def split_print_space(s):  # リストの中身をスペース区切りで出力する
    print(" ".join([str(i) for i in s]))


def split_print_enter(s):  # リストの中身を改行区切りで出力する
    print("\n".join([str(i) for i in s]))


def soinsuu_bunkai(n):  # 素因数分解
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):  # nCrをmodを使って計算する
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        # print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):  #  modnにおける逆元を計算
    return power(n, mod - 2)


def power(n, p, mod_=mod):  # 繰り返し二乗法でn**p % modを計算
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


def nibutan_func(func, target, left, right, side="left"): # 関数を二分探索
    l = left
    r = right
    while r-l > 1:
        x = (l+r)//2
        if func(x) == target:
            return x
        elif func(x) > target:
            r = x
        else:
            l = x

    if side == "left" or func(x) == target:
        return l
    else:
        return r


def nibutan_list(list_, target, side="left"):  # リストを二分探索
    if not isinstance(list_, list):
        list_ = list(list_)

    l = 0
    r = len(list_)
    while r-l > 1:
        x = (l+r)//2
        if list_[x] == target:
            return x
        elif list_[x] > target:
            r = x
        else:
            l = x

    if side == "left" or list_[x] == target:
        return l
    else:
        return r

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
A = int(input())
B = int(input())
C = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#UnionFind木
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(uf)
  #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')

Submission status: Runtime Error

Solution code:
#UnionFind木
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 = len(uf.members(A[i]))
  n = len(uf.members(B[i]))
  uf.union(A[i],B[i])
  total -= m*n
  ans.append(total)
  
#print(ans)   

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

Submission status: Runtime Error

Solution code:
MOD = 10 ** 5
n, m = map(int, input().split())
kyori = [int(input()) for _ in range(n - 1)]
a = [int(input()) for _ in range(m)]
rui = [0] * n
for i in range(n - 1):
    rui[i + 1] = rui[i] + kyori[i]

ans = 0
tmp = 0
for i in range(m):
    ans += abs(rui[tmp] - rui[tmp + a[i]])
    tmp += a[i]

print(ans % MOD)

Submission status: Runtime Error

Solution code:
MOD = 10 ** 5
n, m = map(int, input().split())
kyori = [int(input()) for _ in range(n - 1)]
a = [int(input()) for _ in range(m)]
rui = [0] * n
for i in range(n - 1):
    rui[i + 1] = rui[i] + kyori[i]

ans = 0
tmp = 0
for i in range(m):
    ans += abs(rui[tmp] - rui[tmp + a[i]]) % MOD
    tmp += a[i]

print(ans % MOD)

Submission status: Runtime Error

Solution code:
MOD = 10 ** 5
n, m = map(int, input().split())
kyori = [int(input()) for _ in range(n - 1)]
a = [int(input()) for _ in range(m)]
rui = [0] * n
for i in range(n - 1):
    rui[i + 1] = rui[i] + kyori[i]

ans = 0
tmp = 0
for i in range(m):
    ans += abs(rui[tmp] - rui[tmp + a[i]])
    tmp += a[i] % MOD

print(ans % MOD)

Submission status: Runtime Error

Solution code:
import sys,queue,math
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = 10**18
MOD = 10**9 + 7
LI = lambda : [int(x) for x in input().split()]
_LI = lambda : [int(x)-1 for x in input().split()]

N,M = LI()
B = [_LI() for _ in range(M)]

g = [i for i in range(N)]
c = [1 for _ in range(N)]

def root(x):
    if x != g[x]: g[x] = root(g[x])
    return g[x]

def union(x,y):
    rx = root(x)
    ry = root(y)
    if rx != ry:
        if c[ry] > c[rx]: ry,rx = rx,ry
        g[ry] = rx
        c[rx] += c[ry]
        c[ry] = 0

ans = []
B.reverse()
for a,b in B:
    ra = root(a)
    rb = root(b)
    if ra == rb:
        ans.append(0)
    else:
        ans.append(c[ra]*c[rb])
        union(ra,rb)

ans.reverse()
x = 0
for a in ans:
    x += a
    print (x)

Submission status: Runtime Error

Solution code:
A,B,C = [int(s) for s in input().split()]

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

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
N=101
ls=[]
LS=[]
for i in range(1,N):
  if A%i==0:
    ls.append(i)
  if B%i==0:
    LS.append(i)
r=set(ls)
R=set(LS)
r=set(r & R)
r=list(r)
r.sort(reverse=True)
print(r[K-1])

Submission status: Runtime Error

Solution code:
root = [i for i in range(N + 1)]
comp_size = [1] * (N+1)
 
def root_find(x):
  y = root[x]
  if x == y:
    return x
  else:
    z = root_find(y)
    root[x] = z
    return z

def merge(x, y):
  #print(x, y)
  rx = root_find(x)
  ry = root_find(y)
  sx = comp_size[rx]
  sy = comp_size[ry]
  if rx == ry:
    return 0
  else:
    if sx >= sy:
      root[ry] = rx
      comp_size[rx] = sx + sy
    else:
      root[rx] = ry
      comp_size[ry] = sx + sy
    return sx * sy

Submission status: Runtime Error

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

a = int(B/A)

if a >= C:
  print(C)
elif:
  print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sum = B/A

if sum > C:
    print C
else:
    print sum

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
if a*c<b:
    print(c)
else:
    print(b/a)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
if a*b<c:
    print(c)
else:
    print(b/a)

Submission status: Runtime Error

Solution code:
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int c=sc.nextInt();
        if(a*c<b){
            System.out.println(c);
        }else{
            System.out.println(b/a);
        }
    }   
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

white = (H * W) - (W * a) - ((H - a) * b)

print(white)

Submission status: Runtime Error

Solution code:
from collections import deque
s = deque(input())

cnt = 0
i = 1

while i < len(s):
    while len(s) != 0 and s[i - 1] != s[i]:
        s.pop(i)
        s.pop(i - 1)
        i -= 1
        cnt += 2
    i += 1

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
print(eval('min('+input()[::-1].replace(' ',',',1).replace(' ','//')+')'))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c = [int(input()) for _ in range(3)]
print(min(b//a,c))

Submission status: Runtime Error

Solution code:
a,b,c = [int(input()).for _ in range(3)]
print(min(b//a,c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
str = int(input()).split()
a = str[0]
b = str[1]
c = str[2]

if b / a > c:
	print(c)

else:
	print(int(b / a))

Submission status: Runtime Error

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

answer = b//a

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k = 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)[len(lst)-k])

Submission status: Runtime Error

Solution code:
from collections import deque
I = lambda: map(int, input().split())
n, m = I()
bridges = [list(I()) for _ in range(m)][1:]
*set_numbers, = range(n+1)
sets = [{i} for i in range(n+1)]
cnt = n*(n-1)//2
cnts = [cnt]
end_set_number = n
for a, b in bridges[::-1]:
    a, b = set_numbers[a], set_numbers[b]
    if a == b: continue
    set_1, set_2 = sets[a], sets[b]
    cnt -= len(set_1)*len(set_2)
    cnts += max(cnt, 0),
    new_set = set_1|set_2
    sets += new_set,
    end_set_number +=1
    for i in new_set:
        set_numbers[i] = end_set_number
print(*cnts[::-1])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

S = list(map(int, S.split()))

A = S[0]
B = S[1]
C = S[2]

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

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())
if A*C<=B:
  print(C)
elif A*C > B:
  for i in range(B):
    if A*i>=B:
      break
  
  
print(i)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
S = S.split()
howMuch = S[0]
Ihave = S[1]
sutis = S[2]
 
if (Ihave // howMuch) < sutis:
    print(Ihave // howMuch)
else:
    print(sutis)

Submission status: Runtime Error

Solution code:
S = input()
S = S.split()
howMuch = S[0]
Ihave = S[1]
sutis = S[2]
 
ans = int(Ihave)/int(howMuch)
ans2 = int(sutis) * int(howMuch)
if ans < sutis:
    print(int(sutis))
else:
    print(int(ans))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
def w(a,b):
    li=[]
    d = max(a,b)
    for i in range(1,d//2+1):
        if a%(i) == 0 and b%(i)==0:
            li.append(i)
    #print(li)
    print(li[-c])
w(a,b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

if __name__ == '__main__'
    main()

Submission status: Runtime Error

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

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

if __name__ == '__main__'
    main()

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template

# BEGIN CUT HERE
class UnionFind():
    def __init__(self,n):
        self.data = [-1] * n
    
    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        elif self.data[x] < self.data[y]:
            x, y = y, x  # swap
        self.data[x] += self.data[y]
        self.data[y] = x
    
    def find(self, x):
        if self.data[x] < 0:
            return x
        self.data[x] = self.find(self.data[x])
        return self.data[x]

    def same(self, x, y):
        return self.find(x) == self.find(y)
    
    def size(self, x):
        return self.data[self.find(x)]
        
# END CUT HERE

def ABC120_D():
    n, m = mi()
    a = [0] * m
    b = [0] * m
    for i in range(m):
        a[i], b[i] = mi()
        
    uf = UnionFind(n)
    ans = [0] * (m + 1)
    ans[m] = n * (n - 1) // 2

    for i in range(m - 1, -1, -1):
        a[i] -= 1
        b[i] -= 1
        ans[i] = ans[i + 1]
        if uf.same(a[i], b[i]):
            continue
        
        x = uf.size(a[i])
        y = uf.size(b[i])
        ans[i] -= x * y
        
        uf.unite(a[i],b[i])
    
    for i in range(1, m + 1):
        print(ans[i])



if __name__ == '__main__':
    ABC120_D()

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:
#include <bits/stdc++.h>
#include<algorithm>
using namespace std;

int main() {
  
  int A, B, C; 
  cin >> A >> B >> C;
  
  if (A * C <= B){
    cout << C << endl;
  }
  else{
    cout << B / A << endl;
  }
  
  
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -- coding: utf-8 --

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

count = []

for ii in range(1, 101):
    if a % ii == 0 and b % ii == 0:
        count.append(ii)

print(count[-k])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# abc120_a
A, B, C = map(int, input().split())
for i in range(C):
 if (A*(i+1)) >= B:
  print(i+1)
  exit(1)
print(C)

Submission status: Runtime Error

Solution code:
S = input()
print(min(len(re.findall('0', S)), len(re.findall('1', S))) * 2 if len(S) > 1 else 0)

Submission status: Runtime Error

Solution code:
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)
    # if len(buf_sets) > 0:
    #     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]
            # for e in s_b:
            #     d_node2setindex[e] = idx_a
            buf_sets[idx_a] = s_a | s_b
            buf_sets[idx_b] = None
            # buf_sets.pop(idx_b)
    
    d = ans[-1] - delta
    ans.append(d)
    if d == 0:
        flagSkip = True

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

Submission status: Runtime Error

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

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

if __name__ == "__main__":
    main()