12 2021 档案
摘要:# -*- coding:utf-8 -*-'''连续子数组的最大和限定语言:Kotlin、Typescript、Python、C++、Groovy、Rust、C#、Java、Go、C、Scala、Javascript、Ruby、Swift、Php、Python 3输入一个长度为n的整型数组arra
阅读全文
摘要:def bin(alist,target): i,j=0,len(alist)-1 while i<=j: m = (i+j)//2 if target == alist[m]: return m if target > alist[m]: i = m+1 else: j = m-1 return
阅读全文
摘要:driver.get(url):#浏览器加载url driver.back() #浏览器后退 driver.forward() #浏览器前进 driver.refresh() #浏览器刷新(点击刷新按钮) driver.set_page_load_timeout(5) #设置页面加载时间,如果超时会
阅读全文
摘要:'''判断数组元素是否重复,并返回重复次数'''def dump(a): if len(a)<=1: return False a.sort() temp = {} b=a[0] for i in a[1:]: if i==b: if i not in temp: temp[i]=2 else: t
阅读全文
摘要:'''10个瓶子,3个换一个,最多能换多少个'''# -*- coding:utf-8 -*-def digui(a,b): temp=a n=0 while temp//b!=0: n += temp//b temp=temp//b+temp%b return nif __name__ == '_
阅读全文
浙公网安备 33010602011771号