Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class Program
- {
- static void Main(string[] args)
- {
- string number = Console.ReadLine();
- List<char> num = new List<char>();
- for (int i = 0; i < number.Length; i++)
- {
- num.Add(number[i]);
- }
- for (int i = 0; i < 3; i++)
- {
- char last = num.Last();
- num.RemoveAt(num.Count-1);
- if (last != '0') num.Insert(0, last);
- }
- foreach (var digit in num)
- {
- Console.Write(digit);
- }
- Console.WriteLine();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement