标签:输入 ane splay else cin esc pac ide onclick
#include<iostream> #include<cmath> #include<cstdio> #include<iomanip> #define eps 0.0000001 using namespace std; int main() { int n,m; while(cin>>n>>m) { int sum=0,j=1;bool r=true; int i=2;int k=0; for(;j<=n;++j,i+=2) { k+=i;sum++; if(sum==m) { if(r==1) cout<<k/sum;else cout<<" "<<k/sum;r=false;k=0;sum=0; } } if(sum!=0)cout<<" "<<k/sum<<endl; else cout<<endl; } }
标签:输入 ane splay else cin esc pac ide onclick
原文地址:https://www.cnblogs.com/Auroras/p/10795422.html