摘要:
#include #include #define MAXN 40000using namespace std;int a[MAXN];int main(){ int n; while(cin>>n) { memset(a,0,sizeof(a)); a[0]=1; int i,j; for(i=2;i=0;i--) ... 阅读全文
摘要:
#include using namespace std;int main(){ int a,b; while(cin>>a>>b) cout<<a+b<<endl; return 0;} 阅读全文
摘要:
#include using namespace std;int main(){ int n; while(cin>>n) { if(n%2==0) cout<<(n/2*(n+1))<<endl<<endl; else if(n%2==1) cout<<(n+1)/2*n<<endl<<endl; }... 阅读全文