개발자 뺚
[BAEKJOON ONLINE JUDGE] 3733번 : Shares 본문
시간 제한 : 1 초
메모리 제한 : 128 MB
문제
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 aquired by each person (x must be an integer). The problem is to compute the maximum value of x.
Write a program that reads pairs of integer numbers from an input text file. Each pair contains the values of 1 ≤ N ≤ 10000 and 1 ≤ S ≤ 109 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 x and prints that value on the standard output from the beginning of a line, as shown in the example below.
while True:
try:
N, S = map(int, input().split(" "))
print(S // (N + 1))
except EOFError:
break
'Solution > Python' 카테고리의 다른 글
[BAEKJOON ONLINE JUDGE] 5339번 : 콜센터 (1) | 2024.02.01 |
---|---|
[BAEKJOON ONLINE JUDGE] 2420번 : 사파리월드 (1) | 2024.01.31 |
[BAEKJOON ONLINE JUDGE] 2393번 : Rook (0) | 2024.01.28 |
[BAEKJOON ONLINE JUDGE] 2744번 : 대소문자 바꾸기 (0) | 2024.01.27 |
[BAEKJOON ONLINE JUDGE] 2338번 : 긴자리 계산 (1) | 2024.01.25 |