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
- greedy
- two pointers
- bit manipulation
- simulation
- hash table
- dynamic programming
- 코테
- 자바
- 파이썬
- 코딩테스트
- Number Theory
- Binary Tree
- Data Structure
- geometry
- Counting
- Method
- sorting
- string
- 구현
- Binary Search
- java
- Class
- Stack
- array
- implement
- database
- Math
- Matrix
- Tree
- SQL
Archives
- Today
- Total
코린이의 소소한 공부노트
[프로그래머스/Lv.0] 숫자 비교하기 본문
1. Input
1) 정수 num1
2) 정수 num2
2. Output
1) 두 수가 같으면 1 반환
2) 두 수가 다르면 –1 반환
3. Constraint
1) 0 <= num1 <= 10000
2) 0 <= num2 <= 10000
4. Example
Input: num1=10, num2=3 -> Output: -1
Input: num1=5, num2=5 -> Output: 1
5. Code
1) 첫 코드(2022/10/17)
return (num1==num2) ? 1 : -1;
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[프로그래머스/Lv.0] 배열 두배 만들기 (0) | 2022.10.18 |
---|---|
[프로그래머스/Lv.0] 분수의 덧셈 (0) | 2022.10.18 |
[프로그래머스/Lv.0] 두 수의 나눗셈 (0) | 2022.10.18 |
[프로그래머스/Lv.0] 몫 구하기 (0) | 2022.10.18 |
[프로그래머스/Lv.0] 두 수의 곱 (0) | 2022.10.18 |