#include <iostream>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int Index = 0;
int MaxNum = 0;
for (size_t i = 0; i < 5; i++)
{
int AddNum = 0;
for (size_t j = 0; j < 4; j++)
{
int Input;
cin >> Input;
AddNum += Input;
}
if (AddNum > MaxNum)
{
MaxNum = AddNum;
Index = i;
}
}
cout << Index + 1 << " " << MaxNum;
return 0;
}
'CodingTest > Baekjoon' 카테고리의 다른 글
[Baekjoon] 1475번 방 번호 (0) | 2025.03.06 |
---|---|
[Baekjoon] 10808번 알파벳 개수 (0) | 2025.03.06 |
[Baekjoon] 1259번 팰린드롬수 (0) | 2025.02.10 |
[Baekjoon] 2798번 블랙잭 (0) | 2025.02.10 |
[Baekjoon] 2292번 벌집 (0) | 2025.02.10 |