← Back to List

10178번: 할로윈의 사탕 ↗

Solutions

C++14
210 B | 210 chars
#include <iostream>
#include <cstdio>
using namespace std;
int N,a,b;
int main()
{
	cin>>N;
	for(int x=0; x<N; x++)
	{
		cin>>a>>b;
		printf("You get %d piece(s) and your dad gets %d piece(s).\n",a/b,a%b);
	}
}