问题描述
- 类似鞍点的问题求解,求源码
-
这个不太会,求大神源码??????????????????????????????????????????????????????????????????????????????
解决方案
canner reader=new Scanner(System.in);
int[] scores = new scores[16];
for (int i = 0; i < 16; i++)
{
scores[i] = scanner.nextInt();
}
int min = 0;
for (int i = 0; i < 16; i++)
{
if (scores[i] <scores[min]) min = i;
}
System.out.printf("最小值" + score[min] + " " + min / 4 + "," + min % 4);
int sum1 = 0; int sum2 = 0;
for (int i = 0; i < 4; i++)
{
sum1 += scores[i * 5];
sum2 += scores[i * 3 + 3];
}
System.out.printf("sum1=" + sum1 + " sum2=" + sum2);
时间: 2024-10-25 14:16:13