import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int t = sc.nextInt();
int s = 0;
int[] a = new int[1024];
Arrays.fill(a, 0);
for(int i = 0; i < t; i) {
s = sc.nextInt();
int n = 0;
while(s != 0) {
n |= (1 << (s % 10));
s /= 10;
}
a[n];
}
s = 0;
for(int i = 0; i < 1024; i) {
for(int j = i;j < 1024; j) {
if(i == j) s += a[i] * (a[i] - 1)/2;
else if ((i & j) != 0)
s += a[i] * a[j];
}
}
System.out.println(s);
}
}
}
记得标注~~~这个符号,让代码格式更好看一些
i了i了