- 问答
- 2019-05-16 10:34:01 @
import java.util.Scanner;
import java.io.PrintStream;
public class Mainnn {
public static void main(String[] args) throws java.io.UnsupportedEncodingException {
PrintStream ps = new PrintStream(System.out, true, "UTF-8");
Scanner in = new Scanner(System.in, "UTF-8");
int kuan;
int gao;
kuan = in.nextInt();
gao = in.nextInt();
int[][] a = new int[kuan][gao];
for (int i = 0; i <kuan; i++) {
for (int j = a[gao].length-2; j >-1; j--) {
a[i][j] = in.nextInt();
}
}
for (int m = 0; m < gao; m++) {
for (int n =0; n<kuan-2; n++) {
if (a[m][n] == 0) {
ps.print(" ");
} else if (a[m][n] == 1) {
ps.print("*");
}
}
ps.println();
}
}
}
1 条评论
-
小熊 (wlnirvana) LV 8 MOD @ 2019-05-16 17:47:38
请把错误信息贴上来。
- 1