import java.io.*; import java.util.*; import java.awt.*; class lotto_judge { public Scanner sc; public PrintStream ps; public String toString() { return "lotto_judge"; } public void doit() throws Exception { sc = new Scanner( System.in ); ps = System.out; for(;;) { // Read the number of tickets, break if at end. int n = sc.nextInt(); if( n==0 ) break; // 'unseen' will be the count of numbers which haven't been seen. // Initially, there are 49 numbers we haven't seen. // Fred has covered all his bases if unseen==0 int unseen = 49; // Keep track of which numbers we've seen. Initially, we haven't seen any. boolean seen[] = new boolean[50]; Arrays.fill( seen, false ); // Tickets really aren't important - there are just 6n numbers to look at. for( int i=0; i