isJason @ 2022-07-24 13:55:02
#include<bits/stdc++.h>
using namespace std;
int main(){
int n, k, c;
double a, b;
cin>>n>>k;
c=n/k;
a=c*(c+1)/2*k;
b=n*(n+1)/2-a;
cout<<fixed<<setprecision(1)<<a<<" "<<b;
return 0;
}
by Resolute_Faith @ 2022-07-24 13:58:36
因为 c k n 都是整数