import java.util.Scanner; public class CribbageOnSteroids_John { public static final int MAXCARDS = 100; public static long[][] table = new long[16][MAXCARDS]; public static long[] counts = new long[15]; public static int[] values = {0,1,2,3,4,5,6,7,8,9,10,10,10,10}; public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); for(int i=0; i=3) runPoints += currPoints*runLength; currPoints = 0; runLength = 0; } else { runLength++; if (runLength == 1) currPoints = counts[i]; else currPoints *= counts[i]; } } // System.out.println(runPoints); table[0][0] = 1; int j=1; while (counts[j] == 0) j++; table[values[j]][0] = 1; int numVal = 1; for(int i=1; i=0; r--) { for(int c=0; c