1
2
3
4
5
6
7
8
#include <iostream> using namespace std; int main() { int m,n,ans=0; cin>>m>>n; if(m%2==0) m++; for(int i=m;i<=n;i+=2) ans+=i; cout<<ans; return 0; }

发表评论