71


私信TA

用户名:uq_35686384658

访问量:194

签 名:

python_71

等  级
排  名 13693
经  验 856
参赛次数 0
文章发表 3
年  龄 18
在职情况 学生
学  校
专  业

  自我简介:

TA的其他文章

解题思路:

while True:
	try:
		s=list(map(int,input().split()))
		n,m,items=s[0],s[1],s[2:]
		a=[i for i in items[::2]]
		b=[i for i in items[1::2]]
		times=0
		windom=[0]*n
		for i in range(m):
		    dl,fw=a[i],b[i]
		    min_windom=min(windom)
		    chose=windom.index(min_windom)
		    if windom[chose]>dl:
		        times+=windom[chose]-dl
		    windom[chose]=max(dl,windom[chose])+fw
		ans=times/m
		print(f"{ans:.2f}")
	except:
		break


 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区