Deceptive numbers: Difference between revisions
Content added Content deleted
(added RPL) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 1,505: | Line 1,505: | ||
The first 62 deceptive numbers (up to 97681 though not shown in full) are found in 0.179 seconds. |
The first 62 deceptive numbers (up to 97681 though not shown in full) are found in 0.179 seconds. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">/* Deceptive_numbers.wren */ |
||
import "./gmp" for Mpz |
import "./gmp" for Mpz |
||
Line 1,535: | 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. |
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=" |
<syntaxhighlight lang="wren">import "./math" for Int |
||
var count = 0 |
var count = 0 |