标签:stream print mes ret title pac out 奇数 div
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <vector> #include <cmath> #include <queue> #include <deque> #include <cmath> #include <map> using namespace std; typedef long long ll; const double inf=1e20; const int maxn=2e5+10; const int mod=1e9+7; ll n,m; ll nnum,mnum; int main(){ while(scanf("%lld%lld",&n,&m)!=EOF){ nnum=mnum=0; if(m<n)swap(n,m); for(int i=n;i<=m;i++){ if(i%2)nnum+=i*i*i; else mnum+=i*i; } printf("%lld %lld\n",mnum,nnum); } return 0; }
标签:stream print mes ret title pac out 奇数 div
原文地址:https://www.cnblogs.com/wz-archer/p/12425682.html