标签:coin pre http lang lazy range 技术 排列 alt
class Solution(object):
def arrangeCoins(self, n):
"""
:type n: int
:rtype: int
"""
return int(2 ** 0.5 * (n + 1 / 8) ** 0.5 - 1 / 2)
if __name__ == ‘__main__‘:
solution = Solution()
print(solution.arrangeCoins(5))
标签:coin pre http lang lazy range 技术 排列 alt
原文地址:https://www.cnblogs.com/panweiwei/p/13065253.html