修正笔误

This commit is contained in:
Hasaki 2018-04-18 06:52:39 +08:00 committed by GitHub
parent 6ee2aab80e
commit 8b0d9452e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ public int arrangeCoins(int n) {
int l = 0, h = n;
while(l <= h){
int m = l + (h - l) / 2;
long x = m * (m + 1L) / 2;
long x = m * (m + 1) / 2;
if(x == n) return m;
else if(x < n) l = m + 1;
else h = m - 1;