思路
强行模拟判断就可以了
#includeusing namespace std; int a[50000]; int main() { int n,m,ans=0,x=0; scanf("%d%d",&n,&m); for (int i=n;i<=m;i++) { if (i%2!=0) { x++; a[x]=i; ans++; } } printf("%d\n",ans); for (int i=1;i<=x;i++) { printf("%d\n",a[i]); } return 0; }
Comments NOTHING