tuoran @ 2024-08-21 19:16:49
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,k;
scanf("%d%d",&n,&k);
int Asum = 0,Bsum = 0;
cin>>n>>k;
for(int i=k;i<=n;i+=k)
Asum+=i;
Bsum = (1+n)*n/2-Asum;
printf("%.1lf",double(Asum)/(n/k));
printf("%.1lf",double(Bsum)/(n-n/k));
return 0;
}
by tuoran @ 2024-08-21 19:28:21
我知道了dalao们已关谢谢
by tuoran @ 2024-08-21 19:29:09
@Scez 我在上一个讨论区已经关注过你了