Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ab5b163

Browse files
authored
Update _299.java (fishercoder1534#71)
11 makes it out of bound
1 parent ef959a1 commit ab5b163

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+1
-1
lines changed

src/main/java/com/fishercoder/solutions/_299.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public String getHint(String secret, String guess) {
3737
}
3838
}
3939
int cows = 0;
40-
for (int i = 0; i < 11; i++) {
40+
for (int i = 0; i < 10; i++) {
4141
cows += Math.min(secretCows[i], guessCows[i]);
4242
}
4343
return bulls + "A" + cows + "B";

0 commit comments

Comments
 (0)