文章
27
粉丝
492
获赞
10
访问
268.9k
在eclipse上运行结果如下: 试了几个数据都是预期的正确答案,实在不知道怎么改,希望能得到大佬帮助
2 3 1
1 2 3
4 5 6
1
4 1
5 2
6 3
N诺报错:
Output Limit Exceeded
Your output is too many.
题目数据通过率为:0%
不明白输出超限怎么改,因为eclipse输出答案并没有超限,代码中的输出语句也不多,所以不懂这种报错要怎么改
import java.util.Scanner;
public class Main {
public static void Operation(int operNum, int a[][], int n, int m) {
int[][] c = new int[m + 1][n + 1];
int[][] d = new int[n + 1][m + 1];
if (operNum == 1) { // 顺旋90
for (int i = 1; i <= m; i++) {
int k = 1;
for (int j = n; j >= 1; j--) {
c[i][k++] = a[j][i];
}
}
print(m,n,c);
}
if (operNum == 2) {// 对半折
for (int i = 1; i <= n; i++) {
int k = 1;
for (int j = m; j >= 1; j--) {
d[i][k++] = a[i][j];
}
}
print(n,m,d);
}
if (operNum == 3) { // 逆旋90
int t = 0;
for (int i = m; i >= 1; i--) {
t++;
int k = 1;
for (int j = 1; j &...
登录后发布评论
暂无评论,来抢沙发