We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30a54dc commit dcaba26Copy full SHA for dcaba26
src/main/java/g3401_3500/s3448_count_substrings_divisible_by_last_digit/Solution.java
@@ -79,13 +79,17 @@ private long countDivisibilityCases(
79
}
80
81
private long countDivisibilityBy4(String s, int j) {
82
- if (j == 0) return 1;
+ if (j == 0) {
83
+ return 1;
84
+ }
85
int num = (s.charAt(j - 1) - '0') * 10 + (s.charAt(j) - '0');
86
return num % 4 == 0 ? j + 1 : 1;
87
88
89
private long countDivisibilityBy8(String s, int j) {
90
91
92
93
if (j == 1) {
94
int num = (s.charAt(0) - '0') * 10 + 8;
95
return (num % 8 == 0 ? 2 : 1);
0 commit comments