#include <stdio.h>

int main(void)
{
	int A, B, C = 0;
	
	scanf("%d %d %d", &A, &B, &C);
	
	if (A>=2 and B>=2 and C>=2)
	{
		if (A<=10000 and B<= 10000 and C<= 10000)
		{
			printf("%d\n", (A+B)%C);
			printf("%d\n", ((A%C) + (B%C))%C);
			printf("%d\n", (A*B)%C);
			printf("%d\n", ((A%C)*(B%C))%C);
		}
	}
	
	return 0;
}
#include <iostream>
using namespace std;

int solution1()
{
	int array[10] = {0, };
	int remainder[42] = {0,};
	int count = 0;
	
	for (int i=0; i<10; i++)
	{
		cin >> array[i];
		
		if (array[i] < 0 or array[i] > 1000)
			return 0;
		
		if (!remainder[array[i] % 42]++)	
			count = count + 1;
	}
	return count;
}



int main(void)
{
	int count = 0;
	count = solution1();
	cout << count << endl;
	
	return 0;
}

+ Recent posts