#include int max = 1000; int used[2055]; int main() { int n; char auta[2005][10]; scanf("%d", &n); while (n != 0) { long sum = 0; for (int i=0; i= k) continue; int tmp = 0; for (int j=0; j<7; j++) { if (auta[i][j] != auta[k][j]) { yes = 1; tmp++; } } if (min > tmp && yes == 1) { min = tmp; } yes = 0; } if (min != max) { sum += min; } } printf("The highest possible quality is 1/%ld.\n", sum); scanf("%d", &n); } return 0; }