https://www.acmicpc.net/problem/10430
using System;
class Program
{
static void Main(string[] args) {
string[] s=Console.ReadLine().Split(' ');
int a=int.Parse(s[0]);
int b=int.Parse(s[1]);
int c=int.Parse(s[2]);
Console.WriteLine("{0}",(a+b)%c);
Console.WriteLine("{0}",((a%c)+(b%c))%c);
Console.WriteLine("{0}",(a*b)%c);
Console.WriteLine("{0}",((a%c)*(b%c))%c);
}
}