관리 메뉴

솜씨좋은장씨

[BaekJoon] 3733번 : Shares (Python) 본문

Programming/코딩 1일 1문제

[BaekJoon] 3733번 : Shares (Python)

솜씨좋은장씨 2022. 9. 2. 22:47
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 Shares 입니다.

 

3733번: Shares

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

www.acmicpc.net

👨🏻‍💻 코드 ( Solution )

def shares(N, S):
    return S // (N + 1)


if __name__ == "__main__":
    while True:
        try:
            N, S = map(int, input().split())
            print(shares(N, S))
        except EOFError:
            break
 

GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07

1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.

github.com

Comments