import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String[] str = bf.readLine().split(" ");
int a = Integer.parseInt(str[0]);
int line = 0;
StringBuffer sb = new StringBuffer("");
for (int i = 0; i < a; i++) {
sb.append(str[1]);
}
sb.append('\n');
if (a % 2 == 0) {
line = a / 2;
for (int j = 1; j < line - 1; j++) {
sb.append(str[1]);
for (int k = 1; k < a-1; k++) {
sb.append(" ");
}
sb.append(str[1] + '\n');
}
} else if (a % 2 == 1) {
line = a / 2 + 1;
for (int j = 1; j < line - 1; j++) {
sb.append(str[1]);
for (int k = 1; k < a-1; k++) {
sb.append(" ");
}
sb.append(str[1] + '\n');
}
}
for (int i = 0; i < a; i++) {
sb.append(str[1]);
}
System.out.println(sb.toString().trim());
}
}
PAT_B_1036_Java(15分)
最新推荐文章于 2020-07-18 18:54:32 发布