An exercise on polyglossy. The same problem solved on multiple languages.
Let be the sum of the digits of a positive integer.
The conjecture was proved by exhaustion for the interval in multiple language implementations. The performance of each language was then avaliated as the following:
Language | Milliseconds |
---|---|
Rust | 108 |
Go | 112 |
C | 271 |
JavaScript | 656 |
Ruby | 9850 |
Python | 16032 |
Haskell | 28365 |