#include <iostream> #include <cstdio> using namespace std; int main() { int x; cin >> x; for (int i = 1; i <= x; i ++ ) if (i % 2 == 1) cout << i << endl; return 0; }
注意取值范围有取等的情况