(String[] args)
| 2 | class Solution |
| 3 | { |
| 4 | public static void main(String[] args) |
| 5 | { |
| 6 | Scanner sc=new Scanner(System.in); |
| 7 | int row=sc.nextInt(); |
| 8 | int col=sc.nextInt(); |
| 9 | int arr[][]=new int[row][col]; |
| 10 | |
| 11 | for(int i=0;i<row;i++) |
| 12 | for(int j=0;j<col;j++) |
| 13 | arr[i][j]=sc.nextInt(); |
| 14 | |
| 15 | int max=0,count=0,index=0; |
| 16 | for(int i=0;i<row;i++) |
| 17 | { count=0; |
| 18 | for(int j=0;j<col;j++) |
| 19 | { |
| 20 | if(arr[i][j]==1) |
| 21 | count++; |
| 22 | } |
| 23 | if(count>max) |
| 24 | { |
| 25 | max=count; |
| 26 | index=i+1; |
| 27 | } |
| 28 | } |
| 29 | System.out.println(index); |
| 30 | } |
| 31 | } |
nothing calls this directly
no outgoing calls
no test coverage detected