|
|
вернуться в форумWhy WA#2 what's wrong? her's my cod! Please help! using System; namespace ConsoleApplication1 { class Program1563 { static void Main() { int n = int.Parse(Console.ReadLine()); string str; string[] strl = new string[n]; int s = -1; for (int i = 0; i < n; i++) { str = Console.ReadLine(); strl[i] = str; Console.WriteLine("i="+i); for (int j = 0; j < i; j++) { if (str == strl[j]) s++; } }
Console.WriteLine(s); Console.ReadLine(); } } }
|
|
|