C# 백준 2953 나는 요리사다(19.10.17)
Console(콘솔)/알고리즘 2019. 10. 17. 18:13https://www.acmicpc.net/problem/2953
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
|
using System;
namespace Syntax
{
class Program
{
static void Main(string[] args)
{
int[] arr = new int[5];
int a = 0;
for (int i = 0; i < 5; i++)
{
int sum = 0;
string[] str = Console.ReadLine().Split(' ');
{
input[j] = int.Parse(str[j]);
sum = sum + input[j];
}
arr[i] = sum;
}
{
if(arr[a] < arr[i])
{
a = i;
}
}
Console.WriteLine($"{a+1} {arr[a]}");
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
|
'Console(콘솔) > 알고리즘' 카테고리의 다른 글
C# 백준 2167 문제(19.10.21) (0) | 2019.10.21 |
---|---|
C# 백준 10818 최솟값 최댓값 (0) | 2019.10.18 |
C# 백준 4344문제 평균은 넘겠지(19.10.17) (0) | 2019.10.17 |
c# 백준 3052 나머지 구하기(19.10.17) (0) | 2019.10.17 |
c# 백준 1546번 문제(19.10.15) (0) | 2019.10.15 |