intsearch(int n) { int i, count, min, max, square, first, second, third;
if (n < 121) { count = 0; return count; } min = sqrt(121); max = sqrt(n); for (i = min, count = 0; i <= max; i++) { square = i*i; first = square % 10; second = square / 10 % 10; third = square / 100; if (first == second || first == third || second == third) count++; }