C#/알고리즘
백준#1427 - 소트인사이드
McRobbin
2020. 4. 19. 15:53
https://www.acmicpc.net/problem/1427
1427번: 소트인사이드
첫째 줄에 정렬하고자하는 수 N이 주어진다. N은 1,000,000,000보다 작거나 같은 자연수이다.
www.acmicpc.net
정렬 문제로 분류된 1427 소트인사이드 문제 입니다.
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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _1427
{
class Program
{
static void Main(string[] args)
{
string input = Console.ReadLine();
var stringList = new List<string>();
{
}
stringList.Reverse();
foreach (string str in stringList)
Console.Write(str);
}
}
}
|
|
스트링으로 입력받고 stringList에 Substring을 각각 가져왔습니다.
그 스트링을 Sort후 Reverse하여 출력했습니다.