Skip to content

Commit 0dd3e9f

Browse files
committed
commit
1 parent dc9c853 commit 0dd3e9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

2806. Account Balance After Rounded Purchase.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ class Solution {
22
public int accountBalanceAfterPurchase(int amt) {
33
// Base case
44
if (amt % 10 == 0) {
5-
return 100-amt;
5+
return 100 - amt;
66
}
77

8-
int ans = 100-amt;
8+
int ans = 100 - amt;
99

1010
return (amt % 10 >= 5) ? (ans / 10) * 10 : ((ans / 10) + 1) * 10;
1111
}

0 commit comments

Comments
 (0)