-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bronze V] Title: 두 수 비교하기, Time: 132 ms, Memory: 14396 KB -BaekjoonHub
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# [Bronze V] 두 수 비교하기 - 1330 | ||
|
||
[문제 링크](https://www.acmicpc.net/problem/1330) | ||
|
||
### 성능 요약 | ||
|
||
메모리: 14396 KB, 시간: 132 ms | ||
|
||
### 분류 | ||
|
||
구현 | ||
|
||
### 문제 설명 | ||
|
||
<p>두 정수 A와 B가 주어졌을 때, A와 B를 비교하는 프로그램을 작성하시오.</p> | ||
|
||
### 입력 | ||
|
||
<p>첫째 줄에 A와 B가 주어진다. A와 B는 공백 한 칸으로 구분되어져 있다.</p> | ||
|
||
### 출력 | ||
|
||
<p>첫째 줄에 다음 세 가지 중 하나를 출력한다.</p> | ||
|
||
<ul> | ||
<li>A가 B보다 큰 경우에는 '<code>></code>'를 출력한다.</li> | ||
<li>A가 B보다 작은 경우에는 '<code><</code>'를 출력한다.</li> | ||
<li>A와 B가 같은 경우에는 '<code>==</code>'를 출력한다.</li> | ||
</ul> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import java.io.*; | ||
import java.util.*; | ||
|
||
public class Main{ | ||
public static void main(String[] args) throws IOException{ | ||
new Main().solution(); | ||
} | ||
private void solution() throws IOException{ | ||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | ||
int[] arr = Arrays.stream(br.readLine().split(" ")) | ||
.mapToInt(Integer::parseInt).toArray(); | ||
String result = "=="; | ||
if(arr[0] > arr[1]) | ||
result = ">"; | ||
else if (arr[0] < arr[1]) | ||
result = "<"; | ||
System.out.println(result); | ||
} | ||
} |