나머지

BiBi·2021년 1월 19일
0

코딩테스트연습

목록 보기
39/66
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <cmath>
using namespace std;


int main() {
	//freopen("input.txt", "rt", stdin);
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	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;
}
profile
Server Network Engineer

0개의 댓글