https://www.acmicpc.net/problem/30874

https://softeer.ai/practice/9496

using System;
using System.Collections.Generic;
namespace softeer
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] process = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            Array.Sort(process);
            Console.WriteLine(process[process.Length - 1] + (n-1));
        }
    }
}

 

'PS > 백준' 카테고리의 다른 글

15686 치킨배달  (0) 2024.08.22
1062번 가르침 [다시보기]  (0) 2024.07.24
10844번 쉬운 계단 수  (0) 2024.07.08
한국이 그리울 땐 서버에 접속하지  (0) 2023.08.26
1931번 회의실배정 (V)  (0) 2023.07.19

+ Recent posts