Hennie
[백준] 2742번 : 기찍 N (JAVA) 본문
QUESTION
ANSWER
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int n = Integer.parseInt(br.readLine());
for(int i=n; i>=1; i--) {
sb.append(i).append("\n");
}
br.close();
System.out.println(sb);
}
}
RESULT
MEMO
2021.04.14 - [BaekJoon/03. for문] - [백준] 2741번 : N 찍기 (JAVA)
똑같은 방식!
'BaekJoon > 03. for문' 카테고리의 다른 글
[백준] 11022번 : A+B - 8 (JAVA) (0) | 2021.04.15 |
---|---|
[백준] 11021번 : A+B - 7 (JAVA) (0) | 2021.04.14 |
[백준] 2741번 : N 찍기 (JAVA) (0) | 2021.04.14 |
[백준] 15552번 : 빠른 A+B (JAVA) (0) | 2021.04.14 |
[백준] 8393번 : 합 (JAVA) (0) | 2021.04.13 |