#include <bits/stdc++.h> //头文件 using namespace std; //命名空间 int main() //主函数,程序入口 { int n=0,m=0,sum=0; cin>>m>>n; for(int i=m;i<=n;i++) { if(i%2==1) { sum+=i; } } cout<<sum; return 0; //程序结束,返回 }
By signing up a 羽润编程 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 羽润编程 universal account