Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <vector>
- using namespace std;
- // PLACE THE OUTPUT OF THE GENERATOR CODE HERE.
- int main() {
- int n, k;
- scanf("%d", &n);
- // Retrieving the number of unlucky numbers up to N.
- for (k = 0; k < ans.size(); k++) {
- if (ans[k] > n) {
- break;
- }
- }
- // Printing all the unlucky numbers up to N in ascending order.
- printf("%d\n", k);
- for (int i = 0; i < k; i++) {
- printf("%d\n", ans[i]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement