diff --git a/rust/src/p0034.rs b/rust/src/p0034.rs index 26ec03b0..d145c313 100644 --- a/rust/src/p0034.rs +++ b/rust/src/p0034.rs @@ -21,7 +21,7 @@ pub fn p0034() -> i128 { for x in 10..100000 { let sum = x.to_string() .bytes() - .fold(0, |a, b| a + factorial::(b - u8::from('0'))); + .fold(0, |a, b| a + factorial::(b - b'0')); if sum == x { answer += x; }