Algorithm
c# | 백준 | 2953
일등하이
2019. 10. 18. 10:20
반응형
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _2953
{
class Program
{
static void Main(string[] args)
{
List<int[]> list = new List<int[]>();
List<int> totalList = new List<int>();
for (int i = 0; i < 5; i++) {
var input = Console.ReadLine();
int total = 0;
arr2[j] = int.Parse(arr[j]);
total += arr2[j];
}
}
int score = 0;
int idx = 0;
{
if (score < totalList[i])
{
score = totalList[i];
idx = i;
}
}
Console.WriteLine("{0} {1}", idx + 1, score);
}
}
}
|
반응형