← Back to List

10833번: 사과 ↗

Solutions

C++14
140 B | 140 chars
#include <iostream>
using namespace std;
int N,A,B,S;
int main()
{
	cin>>N;
	for(int x=0; x<N; x++)
	{
		cin>>A>>B;
		S+=B%A;
	}
	cout<<S;
}