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;
- namespace ConsoleApp2
- {
- class Program
- {
- static string normalize(string r)
- {
- for (int j = 0; j < r.Length; j++)
- {
- if (Char.IsDigit(r, j) == false)
- {
- r = r.Remove(j, 1);
- }
- }
- if (r.Length == 11)
- {
- return r.Remove(0,1) + '\n';
- }
- else
- {
- return "495" + r + '\n';
- }
- }
- static void Main(string[] args)
- {
- string n = (Console.ReadLine());
- string s = "";
- string r;
- for(int i = 0; i < 3; i++)
- {
- r = Console.ReadLine();
- Console.WriteLine(r + "{0}", (normalize(r) == normalize(n) ? " YES" : " NO"));
- }
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement