#780471

Solution for 0030: Sum of Integers by nk0t

Source Code Status Test Cases
    Policy: public     Reviewed: 51    
00.02 sec    4352 KB    9 lines     184 bytes    2013-09-30 21:44
import itertools

while True:
    n, s = map(int, raw_input().split())
    if (n, s) == (0, 0):
        break
    print [sum(a) for a in itertools.combinations(range(10), n)].count(s)


Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 1/1 Python CPU: 00.02 sec Memory: 4352 KB Length: 184 B 2013-09-30 21:44 2013-09-30 21:44
Results for testcases
Case # Verdict CPU Time Memory In Out Case Name
Case #1: : Accepted 00.02 sec 4352 KB
< prev | / | next >  
 
Judge Input #  ( | ) Judge Output #  ( | )


Comments
 
 Under Construction.
 
Categories
 
 
Free Tags