Smallest numbers: Difference between revisions
Added 11l
(Added Python implementation) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 4:
Smallest positive integer '''k''' such that the decimal expansion of '''k<sup>k</sup>''' contains '''n''', where '''n < 51'''
<br><br>
=={{header|11l}}==
{{trans|Python}}
<lang 11l>V numLimit = 51
[Int = Int] resultSet
V base = 1
L resultSet.len != numLimit
V result = String(BigInt(base) ^ base)
L(i) 0 .< numLimit
I String(i) C result & i !C resultSet
resultSet[i] = base
base++
L(i) sorted(resultSet.keys())
print(resultSet[i], end' ‘ ’)</lang>
{{out}}
<pre>
9 1 3 5 2 4 4 3 7 9 10 11 5 19 22 26 8 17 16 19 9 8 13 7 17 4 17 3 11 18 13 5 23 17 18 7 17 15 9 18 16 17 9 7 12 28 6 23 9 24 23
</pre>
=={{header|ALGOL 68}}==
|