LCH22014 @ 2024-07-11 18:25:54
#include<iostream>
#include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
int a,b,sum;
int main()
{
cin>>a>>b;
for(int x=b;x<=a;x+=b)
{
sum+=x;
}
printf("%.1f\n",double(sum)/(a/b));
sum=(1+a)*a/2-sum;
printf("%.1f",double(sum)/(a-a/b));
return 0;
}
by ZYLZPP @ 2024-07-11 18:28:34
@LCH22014
用空格隔开
by I_AK_CTSC @ 2024-07-11 18:28:52
@LCH22014 看题不换行空格
by I_AK_CTSC @ 2024-07-11 18:29:56
@LCH22014 https://www.luogu.com.cn/record/165326394
by I_never_give_up @ 2024-07-11 19:05:14
@LCH22014 不是换行,是空格
注意细节,加油
by LCH22014 @ 2024-07-11 19:38:39
@ZYLZPP@I_AK_CTSC@2609_LJC 谢谢!!!