Skip to content

Baekjoon 10833

1. Problem

문제 확인하기

2. Solution

ans = 0
N = int(input())
for _ in range(N):
    x, y = map(int, input().split())
    ans += y % x
print(ans)