本文章仅用于笔记。部分知识点来源于网络,授权请联系作者([email protected])。
题目
解题
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
while(s.hasNextInt())
{
int m=s.nextInt(),n=s.nextInt(),a=0,max=0;
for(int i=1;i<=m*n;i++)
{
int shu=s.nextInt();
if(Math.abs(shu)>Math.abs(max))
{
max=shu;a=i;
}
}
if(a%n==0)
{
System.out.println(a/n+" "+n+" "+max);
}
else
{
System.out.println((a/n+1)+" "+a%n+" "+max);
}
}
}
}
求来波关注! 谢谢啦0.0!
小小小作者
@Fanny0602