摘要: # import requests,re,json# # 定义一个函数用来请求当当网的网页信息# def request_dangdang(url):# try:# # 使用get请求# response = requests.get(url)# # 判断返回的状态码是否为200# if respo 阅读全文
posted @ 2020-07-01 21:00 月为暮 阅读(401) 评论(0) 推荐(1) 编辑
摘要: from typing import List# 这道题和上一题很类似,但有一些不同,每天都可以买入,或者卖出# 那么利润最大化,就是i + 1 天的价格比i天的价格高的时候买入# 然后在i + 1天卖出class Solution: def maxProfit(self, prices: List 阅读全文
posted @ 2020-07-01 16:40 月为暮 阅读(230) 评论(0) 推荐(0) 编辑