일상

10430 : 나머지

STUDYING,,, 2021. 7. 23. 19:57
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);
	}
}

'일상' 카테고리의 다른 글

10869 : 사칙연산  (0) 2021.07.23
10718 : We love kriii  (0) 2021.07.23
10172 : 개  (0) 2021.07.23
10171 : 고양이  (0) 2021.07.23
2588 : 곱셈  (0) 2021.07.23