๋ฐ์ํ
import java.util.Scanner;
public class Main {
// 2438 ๋ณ ์ฐ๊ธฐ - 1
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
String star = "";
for (int i=0; i<t; i++) {
star += "*";
System.out.println(star);
}
}
}
๋ณ์๋ง for๋ฌธ ๋ฐ์ ์ ์ธํ๊ณ for๋ฌธ ์์ " * " ๋ณ๋ง ๋ํด์ฃผ๋ฉด ๋ฉ๋๋ค.
๋ฐ์ํ
'๐ธ Algorithm > ๐ธ ๋ฐฑ์ค BaekJoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค][java][10952][A+B - 5] (0) | 2023.10.09 |
---|---|
[๋ฐฑ์ค][java][2439][๋ณ ์ฐ๊ธฐ - 2] (0) | 2023.10.09 |
[๋ฐฑ์ค][java][11022][A+B - 8] (1) | 2023.10.08 |
[๋ฐฑ์ค][java][11021][A+B - 7] (0) | 2023.10.08 |
[๋ฐฑ์ค][java][15552][๋น ๋ฅธ A+B] (1) | 2023.10.08 |