@William33/

RecentHeftyTern-11

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from itertools import combinations
lis = [3, 9, 8, 2, 5, 6, 7, 1, 47, 16, 48, 49, 43, 19, 36, 42, 17, 41, 10, 35, 29, 12, 37, 20, 44, 45, 40, 30, 15, 21, 38, 13, 31, 14, 34, 33]
for i in (5, len(lis)):
    for comb in combinations(lis, i):
       if sum(comb) == 107:
           print (comb,'= 107')
              
    for comb in combinations(lis, i):
       if sum(comb) == 113:
           print (comb,'= 113')        
    
    for comb in combinations(lis, i):
       if sum(comb) == 119:
           print (comb,'= 119')
           
    for comb in combinations(lis, i):
       if sum(comb) == 131:
           print (comb,'= 131')        
    
    for comb in combinations(lis, i):
       if sum(comb) == 137:
           print (comb,'= 137')
           
    for comb in combinations(lis, i):
       if sum(comb) == 143:
           print (comb,'= 143')        
    
    
    
    
    for comb in combinations(lis, i):
       if sum(comb) == 149:
           print (comb,'= 149')       
           
    for comb in combinations(lis, i):
       if sum(comb) == 141:
           print (comb,'= 141')        
    
    for comb in combinations(lis, i):
       if sum(comb) == 133:
           print (comb,'= 133')
           
    for comb in combinations(lis, i):
       if sum(comb) == 117:
           print (comb,'= 117')        
    
    for comb in combinations(lis, i):
       if sum(comb) == 109:
           print (comb,'= 109')       
           
    for comb in combinations(lis, i):
       if sum(comb) == 101:
           print (comb,'= 101') 
     
    
    
           
           
for i in (6, len(lis)):
    for comb in combinations(lis, i):
       if sum(comb) == 150:
           print (comb,'= 150')