This page is still under construction.

Parts of this page are still being built. What you see may change.

Shares

Time limit1sMemory limit128 MB

Summary
For repeated pairs N and S, print the largest integer x such that N times x does not exceed S.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

A group of NN persons and the ACM Chief Judge share equally a number of SS shares (not necessarily all of them). Let xx be the number of shares acquired by each person (xx must be an integer). The problem is to compute the maximum value of xx.

Write a program that reads pairs of integer numbers from an input text file. Each pair contains the values of NN (1≤N≤100001 \le N \le 10000) and SS (1≤S≤1091 \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. For each pair of numbers the program computes the maximum value of xx and prints that value on the standard output from the beginning of a line, as shown in the example below.

Examples1

  1. Example 1

    Input
    1 100
    2 7
    10 9
    10 10
    
    Expected output
    50
    2
    0
    0