-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheje1003.java
More file actions
27 lines (27 loc) · 759 Bytes
/
eje1003.java
File metadata and controls
27 lines (27 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.util.Scanner;
import java.util.Arrays;
public class eje1003
{
public static void main(String [] args){
Scanner lee = new Scanner(System.in);
int i = lee.nextInt();
for(int x=0; x<i; x++){
int columnas = lee.nextInt();
int filas = lee.nextInt();
int [] con = new int[columnas];
for(int f=0; f<filas; f++ ){
for(int c=0; c<columnas; c++){
con[c]+=lee.nextInt();
}
}
int c=0, r=0;
for(int j=0; j<con.length; j++){
if(c<con[j]){
c=con[j];
r=j;
}
}
System.out.println(r+1);
}
}
}