using System.Collections.Generic;
public static void Main()
Console.WriteLine(sherlockAndAnagrams(s1));
Console.WriteLine(sherlockAndAnagrams(s2));
string s3 = "ifailuhkqq";
Console.WriteLine(sherlockAndAnagrams(s3));
Console.WriteLine(sherlockAndAnagrams(s4));
Console.WriteLine(sherlockAndAnagrams(s5));
static int sherlockAndAnagrams(string s) {
Dictionary<char, int> dic = new Dictionary<char, int>()
{'a', 0},{'b', 0},{'c', 0},{'d', 0},{'e', 0},{'f', 0},
{'g', 0},{'h', 0},{'i', 0},{'j', 0},{'k', 0},{'l', 0},
{'m', 0},{'n', 0},{'o', 0},{'p', 0},{'q', 0},{'r', 0},
{'s', 0},{'t', 0},{'u', 0},{'v', 0},{'w', 0},{'x', 0},
foreach(KeyValuePair<char, int> kvp in dic.Where(i => i.Value > 1))
Console.WriteLine("Key {0} Value {1}", kvp.Key, kvp.Value);
foreach(KeyValuePair<char, int> kvp in dic.Where(i => i.Value > 1))
Total += dic.Where(i => i.Value > 1).Count();