题目描述
开区间
样例
#include <bits/stdc++.h>
using namespace std;
int main(){
int x, y, n = 0;
cin >> x >> y;
if(x > y) swap(x, y);
for(int i = x + 1;i < y ;i++){
if(i % 2 != 0) n += i;
}
cout << n;
return 0;
}
include[HTML_REMOVED]
int main()
{
int n,m,s=0;
scanf(“%d%d”,&n,&m);
if(n[HTML_REMOVED]m)
{
m=m+1;
while(m<n)
{
if(m%2!=0)
s+=m;
m++;
}
}
printf(“%d”,s);
return 0;
}