Jump to content

Distribution of 0 digits in factorial series: Difference between revisions

added Arturo
m (remove draft tag)
(added Arturo)
Line 132:
The mean proportion dips permanently below 0.16 at 47332.
</pre>
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">su: 0.0
f: 1
lim: 100
loop 1..10000 'n [
'f * n
str: to :string f
'su + (enumerate str 'c -> c = `0`) // size str
if n = lim [
print [n ":" su // n]
'lim * 10
]
]</syntaxhighlight>
 
{{out}}
 
<pre>100 : 0.2467531861674322
1000 : 0.2035445511031646
10000 : 0.1730038482418671</pre>
 
=={{header|C++}}==
{{trans|Phix}}
Line 213 ⟶ 233:
The mean proportion dips permanently below 0.16 at 47332. (4598ms)
</pre>
 
=={{header|Go}}==
===Brute force===
1,532

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.