Humble numbers: Difference between revisions
→{{header|jq}}: until()
(→{{header|jq}}: typo) |
(→{{header|jq}}: until()) |
||
Line 3,072:
end;
def task($digits; $count):
{len: 0, i:0, count: 0}
| until(
| if (
|
then .humble[.len] += 1
| if .count < $count then .count += 1 | .humbles += [
else .
| "First \($count):", .humbles,▼
end
"Distribution of the number of decimal digits up to \($digits) digits:",▼
else .
(.humble | range(1;length) as $i | " \($i): \(.[$i])");▼
end)
{{out}}
<pre>First 50:
[1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27,28,30,32,35,36,40,42,45,48,49,50,54,56,60,63,64,70,72,75,80,81,84,90,96,98,100,105,108,112,120]
Distribution of the number of decimal digits up to 6 digits:
|