목차
1. 문제

2. 맞춘코드
// [백준 Java] 10430: 나머지
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class bj10430{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine(), " ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
int C = Integer.parseInt(st.nextToken());
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);
}
}
'💻 문제풀고 정리하기 + > 백준' 카테고리의 다른 글
| [백준 Java] 11382: 꼬마 정민 (2) | 2023.08.26 |
|---|---|
| [백준 Java] 2588: 곱셈 (0) | 2023.08.26 |
| [백준 Java] 18108: 1998년생인 내가 태국에서는 2541년생?! (0) | 2023.08.26 |
| [백준 Java] 10926: ??! (0) | 2023.08.26 |
| [백준 Java] 10869: 사칙연산 (0) | 2023.08.26 |