Advertisement
knoteva

Untitled

Jul 19th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Text.RegularExpressions;
  4.  
  5. namespace _06._RepRepCh
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             string input = Console.ReadLine();
  12.             Console.WriteLine(Regex.Replace(input, "(.)\\1+", "$1"));
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement