Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace MagicExchangeableWords
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] inputWords = Console.ReadLine().Split();
- var word1 = inputWords[0];
- var word2 = inputWords[1];
- //
- HashSet<char> w1 = new HashSet<char>(word1);
- HashSet<char> w2 = new HashSet<char>(word2);
- var isExchangeble = w1.Count == w2.Count ?
- "true" : "false";
- Console.WriteLine(isExchangeble);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement