Skip to content

Commit 10076b2

Browse files
committed
[Bronze V] Title: 사칙연산, Time: 216 ms, Memory: 17760 KB -BaekjoonHub
1 parent 977be1e commit 10076b2

4 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# [Bronze V] 사칙연산 - 10869
2+
3+
[문제 링크](https://www.acmicpc.net/problem/10869)
4+
5+
### 성능 요약
6+
7+
메모리: 17760 KB, 시간: 216 ms
8+
9+
### 분류
10+
11+
구현, 사칙연산, 수학
12+
13+
### 제출 일자
14+
15+
2023년 2월 6일 20:38:53
16+
17+
### 문제 설명
18+
19+
<p>두 자연수 A와 B가 주어진다. 이때, A+B, A-B, A*B, A/B(몫), A%B(나머지)를 출력하는 프로그램을 작성하시오. </p>
20+
21+
### 입력
22+
23+
<p>두 자연수 A와 B가 주어진다. (1 ≤ A, B ≤ 10,000)</p>
24+
25+
### 출력
26+
27+
<p>첫째 줄에 A+B, 둘째 줄에 A-B, 셋째 줄에 A*B, 넷째 줄에 A/B, 다섯째 줄에 A%B를 출력한다.</p>
28+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7 3
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
10
2+
4
3+
21
4+
2
5+
1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import java.util.Scanner;
2+
3+
public class Main {
4+
public static void main(String[] args) {
5+
Scanner scanner=new Scanner(System.in);
6+
int A=scanner.nextInt();
7+
int B=scanner.nextInt();
8+
if(A>=1 & B<=10000){
9+
System.out.println(A+B);
10+
System.out.println(A-B);
11+
System.out.println(A*B);
12+
System.out.println(A/B);
13+
System.out.println(A%B);
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)