Notice
Recent Posts
Recent Comments
Link
목록백준알고리즘 (2)
drexqq
[Java, 자바] 백준알고리즘 단계별로 풀기 - 3단계
2739번 N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다. import java.util.*; public class Main { public static void main(String[] args) { //첫째 줄에 N이 주어진다. N은 1보다 크거나 같고, 9보다 작거나 같다. Scanner sc = new Scanner(System.in); int N = sc.nextInt(); if (N >= 1 && N
공부노트/백준알고리즘
2020. 5. 29. 19:46
[Java, 자바] 백준알고리즘 단계별로 풀기 - 2단계
1330번 두 정수 A와 B가 주어졌을 때, A와 B를 비교하는 프로그램을 작성하시오. import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String num = sc.nextLine(); // .next() -> 공백 제거 // /nextLine() -> 공백 유지 String splitArr[] = num.split(" "); int n1, n2; n1 = Integer.parseInt(splitArr[0]); n2 = Integer.parseInt(splitArr[1]); if (n1 == n2) { System.out.println("=="..
공부노트/백준알고리즘
2020. 5. 26. 19:52