摘要:
最少立方数之和 题目描述给出一个数字N(0<N<1000000),将N写成立方数和的形式,求出需要的最少立方数个数。例如N=17,1+8+8 = 17,最少需要3个立方数,则输出3。N= 28,1+1+1+1+8+8+8=28, 需要7个立方数,1+27=28,需要2个立方数,所以最少立方数为2,则
阅读全文
posted @ 2019-09-11 09:11
Sempron2800+
阅读(358)
推荐(0)
编辑
摘要:
1 from datetime import datetime 2 3 class Solution: 4 def dayOfTheWeek(self, day: int, month: int, year: int) -> str: 5 days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday","Sund
阅读全文
posted @ 2019-09-11 07:19
Sempron2800+
阅读(221)
推荐(0)
编辑
摘要:
1 class Solution: 2 def distanceBetweenBusStops(self, distance: List[int], start: int, destination: int) -> int: 3 if start == destination: 4 return 0 5 elif start < destination: 6 dis1,dis2 = 0,0 7 f
阅读全文
posted @ 2019-09-11 07:08
Sempron2800+
阅读(162)
推荐(0)
编辑