별찍기 문제만 몇 번 풀어봤으면 풀 수 있는 쉬운 문제다.
import java.util.Scanner;
class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
for(int i=0; i<b; i++){
for(int j=0; j<a; j++){
System.out.print("*");
}
System.out.println("");
}
}
}
다른 사람들의 풀이를 보니 역시 stream을 많이 이용하여 문제를 풀었다.
백준 문제를 풀 때 마다 느꼈지만 스트림 공부를 해야겠다고 느꼈다. ㄱ-..