- 还有一级(第5轮)
奇数求和
- 2023-7-27 13:54:08 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i,m,n,sum=0;
scanf("%d %d",&m,&n);
if(m%2==0)
m++;
for(i=m;i<=n;i+=2)
sum+=i;
printf("%d\n",sum);
return 0;
}
0 comments
No comments so far...