๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Algorithm/๋ฐฑ์ค€(BOJ)

[ ํŒŒ์ด์ฌ(python) ] ๋ฐฑ์ค€ 10833 - ์‚ฌ๊ณผ

by YWTechIT 2021. 6. 11.
728x90

๐Ÿ“ ๋ฐฑ์ค€ 10833 - ์‚ฌ๊ณผ

๋ฐฑ์ค€ 10833 - ์‚ฌ๊ณผ


๐Ÿ’ก ๋‚˜์˜ ํ’€์ด

๊ฐ ํ•™๊ต์˜ `์‚ฌ๊ณผ ๊ฐœ์ˆ˜ % ํ•™์ƒ ์ˆ˜`๋ฅผ ๋ˆ„์ ์‹œ์ผœ์ฃผ๋ฉด ๋œ๋‹ค.

n = int(input())
rest = 0

for _ in range(n):
    student, apple = map(int, input().split())
    rest += (apple % student)
print(rest)
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€