···2424 let len = num_string.len();
25252626 // we'll only check up to the half way mark since after that it cant possibly repeat
2727- for i in 0..=(len / 2) {
2727+ for i in 0..=(len / 2 - 1) {
2828 let substring_len = i + 1;
2929- // i kinda wanted to get rid of the second check but cant bc of nums with 2 digits
3030- if len % substring_len == 0 && len != substring_len {
2929+ if len % substring_len == 0 {
3130 if num_string == num_string.get(0..=i).unwrap().repeat(len / substring_len) {
3231 counter += num;
3332 continue 'outer;