未验证 提交 8b0d9452 编写于 作者: H Hasaki 提交者: GitHub

修正笔误

上级 6ee2aab8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册