#include <iostream>  

using namespace std;

int main(void)
{
	int a, b,c;
	cin >> a >> b >> c;
	cout << (a+b)%c << endl;
	cout << (a%c + b%c) % c << endl;
	cout << (a * b) % c << endl;
	cout << (a%c * b%c) % c << endl;

}
 


'알고리즘' 카테고리의 다른 글

백준 C++ 10817번  (0) 2017.08.15
백준 C++ 10718번  (0) 2017.08.15
백준 C++ 10172번  (0) 2017.08.15
백준 C++ 9498번  (0) 2017.08.15
백준 C++ 8393번  (0) 2017.08.15

+ Recent posts