Deceptive numbers: Difference between revisions

m
(added RPL)
m (→‎{{header|Wren}}: Minor tidy)
Line 1,505:
 
The first 62 deceptive numbers (up to 97681 though not shown in full) are found in 0.179 seconds.
<syntaxhighlight lang="ecmascriptwren">/* deceptive_numbersDeceptive_numbers.wren */
 
import "./gmp" for Mpz
Line 1,535:
 
As discussed in the talk page, it is also possible to do this task without using big integers and the following version runs under Wren-cli albeit somewhat slower at 0.103 seconds for the first 25 deceptive numbers and 0.978 seconds for the first 62. The output is the same as the GMP version.
<syntaxhighlight lang="ecmascriptwren">import "./math" for Int
 
var count = 0
9,476

edits