#力扣 LeetCode441. 排列硬幣 @FDDLC
阿新 • 來源:網路 • 發佈:2021-02-19
技術標籤:演算法&資料結構
題目描述:
https://leetcode-cn.com/problems/arranging-coins/
Java程式碼:
class Solution { //n>=0
public int arrangeCoins(int n) {
return (int)(Math.sqrt(0.25+n*2.0)-0.5);
}
}

