
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
System.out.println((A+B)%C);
System.out.println(((A%C)+(B%C))%C);
System.out.println((A*B)%C);
System.out.println(((A%C)*(B%C))%C);
}
}
'Algorithm > Baekjoon' 카테고리의 다른 글
[백준] #1330: 두 수 비교하기 (0) | 2022.02.21 |
---|---|
[백준] #2588: 곱셈 (0) | 2022.02.20 |
[백준] #18108: 1998년생인 내가 태국에서는 2541년생?! (0) | 2022.02.20 |
[백준] #10926: ??! (0) | 2022.02.20 |
[백준] #10869: 사칙연산 (0) | 2022.02.20 |