摘要: 因为要求输入是整数,我就以为需要一直是整数,就不会,这个错误认知导致我浪费了好多时间,,,, 我一直以为第2 行里面的参数x是整数,所以第7行里面的参数s[1:-1]所在的位置就必须是整数,结果不是。。。 没想明白。。。。 执行用时 :96 ms, 在所有 Python3 提交中击败了62.01%的 阅读全文
posted @ 2019-09-19 21:50 欣姐姐 阅读(138) 评论(0) 推荐(0)
摘要: 用时8分20秒: public int maxProfit(int[] prices) { int n = prices.length; if(n<=1) return 0; int min_price = prices[0]; int interest = 0; for(int i = 1;i<n 阅读全文
posted @ 2019-09-19 15:49 欣姐姐 阅读(128) 评论(0) 推荐(0)