seerc-2010-j
A group of N persons and the ACM Chief Judge share equally a number of S shares (not necessary all of them). Let x be the number of shares acquired by each person (x must be an integer). The problem is to compute the maximum value of x.
InputWrite a program that reads pairs of integer numbers from an input text file. Each pair contains the values of 1 \le N \le 10000 and 1 \le S \le 10^9 in that order. The input data are separated freely by white spaces, are correct, and terminate with an end of file.
OutputFor each pair of numbers the program computes the maximum value of x and prints that value on the standard output from the beginning of a line, as shown in the example below.
[ex]
Input:
1 100
2 7
10 9
10 10Output:
50
2
0
0Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.