16 lines
325 B
Text
16 lines
325 B
Text
V fact = [1]
|
||
L(n) 1..11
|
||
fact.append(fact[n-1] * n)
|
||
|
||
L(b) 9..12
|
||
print(‘The factorions for base ’b‘ are:’)
|
||
L(i) 1..1'499'999
|
||
V fact_sum = 0
|
||
V j = i
|
||
L j > 0
|
||
V d = j % b
|
||
fact_sum += fact[d]
|
||
j I/= b
|
||
I fact_sum == i
|
||
print(i, end' ‘ ’)
|
||
print("\n")
|