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;
- namespace EdabitChallenges
- {
- class Program
- {
- public static void Main(string[] args)
- {
- string phrase = Console.ReadLine();
- Console.WriteLine(isIdentical(phrase));
- Console.ReadLine();
- }
- static bool isIdentical(string str)
- {
- return str.Distinct().Count() == 1; // numara cate secvente de caractere se repeta
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment