eolymp
bolt
Try our new interface for solving problems

Shares

A group of \textbf{N} persons and the ACM Chief Judge share equally a number of \textbf{S} shares (not necessary all of them). Let \textbf{x} be the number of shares aquired by each person (\textbf{x} must be an integer). The problem is to compute the maximum value of \textbf{x}. Write a program that reads pairs of integer numbers from an input text file. \InputFile Each pair contains the values of \textbf{1} ≤ \textbf{N} ≤ \textbf{10000} and \textbf{1} ≤ \textbf{S} ≤ \textbf{10^9} in that order. The input data are separated freely by white spaces, are correct, and terminate with an end of file. \OutputFile For each pair of numbers the program computes the maximum value of \textbf{x} and prints that value on the standard output from the beginning of a line, as shown in the example below.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
1 100
2 7
10 9
10 10
Çıxış verilənləri #1
50
2
0
0