Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace TSORT
- {
- class ContestUtil
- {
- public static int ParseInt(string str)
- {
- str.Trim();
- int ret = 0;
- for (int i = 0; i < str.Length; i++)
- {
- ret += (str[i] - '0') * (int)Math.Pow(10, str.Length - i - 1);
- }
- return ret;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- int numbers_count = int.Parse(Console.ReadLine());
- int[] numbers = new int[1000000];
- int tmp;
- for (int i = 0; i < numbers_count; i++)
- {
- tmp = ContestUtil.ParseInt(Console.In.ReadLine());
- numbers[tmp] += 1;
- }
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < 1000000; i++)
- {
- for (int j = 0; j < numbers[i]; j++)
- {
- sb.AppendLine(i.ToString());
- }
- }
- Console.Write(sb.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement