Cleanup armstrong

This commit is contained in:
Avery Winters 2024-10-24 13:04:25 -05:00
parent 44021cacdf
commit c3316e6ad9
Signed by: avery
SSH key fingerprint: SHA256:eesvLB5MMqHLZrAMFt6kEhqJWnASMLcET6Sgmw0FqZI

View file

@ -6,8 +6,7 @@ pub fn is_armstrong_number(num: u32) -> bool {
let divisor = 10u32.pow(i);
let quotient = num / divisor;
let digit = quotient % 10;
let raised = digit.pow(count);
raised
digit.pow(count)
}).sum();
num == armstrong_sum
}