Skip to content

Commit

Permalink
Add type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 23, 2024
1 parent 34a1184 commit 4d143cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/p0034.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<u32>(b - '0'.into()));
.fold(0, |a, b| a + factorial::<u32>(b - '0'.into::<u8>()));
if sum == x {
answer += x;
}
Expand Down

0 comments on commit 4d143cc

Please sign in to comment.