please help me to learn what am i doing wrong the code is below:
using System;
namespace ConsoleApplication1
{
class Program
{
private static int[] numlistss;
static void Main(string[] args)
{
string s = Console.ReadLine();
int testCases = int.Parse(s);
for (int i = 0; i < testCases; ++i)
{
if (i == 0)
{
numlistss = new int[testCases];
}
string tt = Console.ReadLine();
string[] line = tt.Split(' ');
int l =int.Parse(line[0]);
int r =int.Parse(line[1]);
int ans = 0;
for (int j = l; j <= r; j++)
{
if (j <= 10)
{ ans++; continue; }
else if (j % 11 == 0)
{ continue; }
else
{
string val = j.ToString();
char[] szArr = val.ToCharArray();
for (int iter = 0; iter < szArr.Length; iter++)
{
int first = val.IndexOf(szArr[iter]);
int last = val.LastIndexOf(szArr[iter]);
if (last != first)
break;
if ((iter + 1) == szArr.Length)
ans++;
}
}
}
numlistss[i] = ans;
}
for (int test = 0; test < numlistss.Length; test++)
{
Console.WriteLine(numlistss[test]);
}
}
}
}