#P1876. 开灯

开灯

Description

At the start, all lights are off (note: off!). The person numbered 11 comes and turns on all lights whose indices are multiples of 11. The person numbered 22 turns off all lights whose indices are multiples of 22. The person numbered 33 toggles all lights whose indices are multiples of 33 (those that are on are turned off, those that are off are turned on), and so on, until the person numbered NN finishes.

Given NN, after NN rounds, determine which lights are still on.

Input Format

A single number NN, representing both the number of lights and the number of rounds.

Output Format

Several numbers, the indices of the lights that are on.

5
1 4

Hint

Constraints

For 100%100 \% of the testdata, 1N2401 \le N \le 2^{40}.

Additional Notes

Math problem!

Translated by ChatGPT 5