Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- sorting
- Class
- greedy
- Matrix
- simulation
- java
- Data Structure
- Counting
- Binary Tree
- Binary Search
- implement
- dynamic programming
- 자바
- Tree
- SQL
- 구현
- bit manipulation
- database
- 코테
- Method
- Math
- Number Theory
- geometry
- Stack
- 파이썬
- string
- 코딩테스트
- two pointers
- hash table
- array
Archives
- Today
- Total
코린이의 소소한 공부노트
[백준 온라인 저지] 1330. 두 수 비교하기 본문
- 입력: 첫째 줄에 A와 B가 주어진다. A와 B는 공백 한 칸으로 구분되어져 있다.
- 출력: 첫째 줄에 다음 세 가지 중 하나를 출력한다.
// A가 B보다 큰 경우에는 '>'를 출력한다.
// A가 B보다 작은 경우에는 '<'를 출력한다.
// A와 B가 같은 경우에는 '=='를 출력한다.
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt(), b = scan.nextInt();
if(a>b) System.out.println(">");
else if(a<b) System.out.println("<");
else System.out.println("==");
}
}
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[백준 온라인 저지] 2753. 윤년 (0) | 2023.03.17 |
---|---|
[백준 온라인 저지] 9498. 시험 성적 (0) | 2023.03.17 |
[백준 온라인 저지] 1110. 더하기 사이클 (0) | 2023.03.17 |
[백준 온라인 저지] 10951. A+B - 4 (0) | 2023.03.17 |
[백준 온라인 저지] 10952. A+B - 5 (0) | 2023.03.17 |