Python求大佬帮助
查看原帖
Python求大佬帮助
594967
ytt02_11楼主2023/3/6 17:47
n,k = map(int,input().split())
i =0
a =[];b = []
for i in range(n+1):
    if i%k ==0:
        a.append(i)
    elif i%k !=0:
        b.append(i)
    i+=1
from numpy import *
A=mean(a);B=round(mean(b),1)
print(A,B)

不知道算法哪里有问题 A类数的结果跟预期不一样,

2023/3/6 17:47
加载中...