Algorithms
[백준 알고리즘] (I/O) 2739번 Java 풀이
SDev
2020. 3. 5. 10:48
728x90
입출력 - 2557, 1000, 2558, 10950, 10951, 10952, 10953, 11021, 11022, 11718, 11719, 11720, 11721, 2741, 2742, 2739, 1924, 8393, 10818, 2438, 2439, 2440, 2441, 2442, 2445, 2522, 2446, 10991, 10992
출처: https://plzrun.tistory.com/entry/알고리즘-문제풀이PS-시작하기 [plzrun's algorithm]
change Nxxxx -> Main && remove package lines!!!
이클립스에서 작성하면서 문제 이름으로 클래스를 생성하여 풀었기 때문에
클래스 이름을 Main으로 바꾸고, package 부분도 지우고 제출해야 정상적으로 돌아갑니다.
<풀이>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package io;
public class N2739 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i=1; i<10; i++) {
int multiple = n*i;
System.out.println(n +" * " +i +" = " +multiple);
}
}
}
|
Github: https://github.com/jaeuk9407/AlgorithmBOJ
jaeuk9407/AlgorithmBOJ
BaekJoon Online Judge Problems. Contribute to jaeuk9407/AlgorithmBOJ development by creating an account on GitHub.
github.com