NO.14681


풀이코드
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if(x>0) {
if(y>0) {
System.out.println(1);
} else
System.out.println(4);
} else {
if(y>0) {
System.out.println(2);
} else{
System.out.println(3);
}
}
}
}
📌 아직 코드가 짧고 숫자형들이라 그런가 scanner 가 작성하기 너무 편하다.. 편식하면 안되는데..
일단 할 게 많으니까 급한거 먼저 하고 자투리시간에 bufferedReader 도 해봐야겠다.
'JAVA-BAEKJOON > 2단계 조건문' 카테고리의 다른 글
[백준/02-06] 2525 오븐 시계 (0) | 2024.02.20 |
---|---|
[백준/02-05] 2884 알람 시계 (0) | 2024.02.19 |
[백준/02-03] 2753 윤년 (0) | 2024.02.18 |
[백준/02-02] 9498 시험 성적 (0) | 2024.02.18 |
[백준/02-01] 1330 두 수 비교하기 (0) | 2024.02.18 |