Armstrong Numbers
⚓ Rust 📅 2026-06-30 👤 surdeus 👁️ 1Hi, I would like some advice about my code for solving the Armstrong Numbers exercise.
The problem is quite simple, Armstrong Numbers are numbers equal to the sum the digits to the power of the length. For example: 153 == 1^3 + 5^3 + 3^3. Here the length is 3. (They consider decimal system only.)
Is there an option that is obviously better in the two cases below?
Reviews or comments not using very advanced stuff (mostly unsafe, memory tricks and so on) would be welcome.
I can't be sure these are totally correct, but they pass all tests.
3 posts - 2 participants
🏷️ Rust_feed