왜 틀렸나요 샘플은 맞던데 ㅜㅜ
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int people = input.nextInt();
input.nextLine();
String[] employee = new String[people];
int[] time = new int[people];
for(int i=0; i<people; i++){
employee[i] = input.next();
int sum = 0;
for(int j=0; j<7; j++){
int k = input.nextInt();
sum += k;
}
time[i] = sum;
}
for(int i=0; i<people; i++){
for(int j=i; j<people; j++){
if(time[j]>time[i]){
int temp1 = time[j];
time[j] = time[i];
time[i] = temp1;
String temp2 = employee[i];
employee[i] = employee[j];
employee[j] = temp2;
}
}
}
for(int i=0; i<people; i++){
System.out.print(employee[i]+" "+time[i]);
if(i<people-1)
System.out.println();
}
}
}