Brazilian numbers: Difference between revisions
→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)"
Thundergnat (talk | contribs) m (Automated syntax highlighting fixup (second round - minor fixes)) |
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
||
Line 4,356:
</pre>
The point of utilizing a sieve is that it caches or memoizes the results. Since we are going through a long sequence of possible Brazilian numbers, it pays off to check the prime factoring in an efficient way, rather than one at a time.
=={{header|V (Vlang)}}==
{{trans|Go}}
<syntaxhighlight lang="v (vlang)">fn same_digits(nn int, b int) bool {
f := nn % b
mut n := nn/b
Line 4,470:
The 100,000th Brazilian number: 110468
</pre>
=={{header|Wren}}==
{{trans|Go}}
|