728x90
SMALL

using System.Collections.Generic;
using System.Linq;

public class Solution {
    public string solution(string s) {
        string answer = "";
        
        List<int> list = s.Split().Select(x => System.Convert.ToInt32(x)).OrderBy(x => x).ToList();
        
        answer = list.First() + " " + list.Last();
        return answer;
    }
}

728x90

설정

트랙백

댓글