Dice Throwing
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
n common cubic dice are thrown. What is the probability that the sum of all thrown dice is at least x?
Input
The input file contains several test cases. Each test case consists two integers n (1 ≤ n ≤ 24) and x (0 ≤ x < 150). The meanings of n and x are given in the problem statement. Input is terminated by a case where n=0 and x=0. This case should not be processed.
Output
For each line of input produce one line of output giving the requested probability as a proper fraction in lowest terms in the format shown in the sample output. All numbers appearing in output are representable in unsigned 64-bit integers.
Examples
Input #1
Answer #1
Submissions 224
Acceptance rate 60%