You are viewing a single comment's thread. Return to all comments →
If you use a list could be easyer to archive it.
using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution {
static void Main(String[] args) { List<string> demail = new List<string>(); int N = Convert.ToInt32(Console.ReadLine()); for(int a0 = 0; a0 < N; a0++){ string[] tokens_firstName = Console.ReadLine().Split(' '); if (tokens_firstName[1].EndsWith("@gmail.com")) demail.Add(tokens_firstName[0]); } demail.Sort(); foreach(string j in demail) Console.WriteLine(j); }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 28: RegEx, Patterns, and Intro to Databases
You are viewing a single comment's thread. Return to all comments →
If you use a list could be easyer to archive it.
using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution {
}