Problem T: 【数组】开灯问题(lights)

Problem T: 【数组】开灯问题(lights)

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 200  Solved: 87
[Submit] [Status] [Web Board] [Creator:]

Description

中文:   
有n盏灯,编号为1~n。第1上人把所有灯打开,第2个人按下所有编号为2的倍数的开关(这些灯将被关掉),第3个人按下所有编号为3的倍数的开关(其中关掉的灯将打开,开着的灯将被关闭),依此类推。一共有k个人,问最后有哪些灯开着?输入:n和k,输出开着的灯的编号。k=<n<=1000。


English:

There are n lights, numbered 1~n. The first person turns on all the lights, the second person flips all the switches numbered in multiples of 2 (the lights will be turned off), the third person flips all the switches numbered multiples of 3 (the lights that are on will be turned off, the lights that are off will be turned on), and so on. There are a total of k people, which lights are on at the end? Input: n and k, output the number of the lights that are on. k=<n<=1000.

Input

两个数n和k。


Two numbers n and k.


Output

开着的灯的编号。


The number of the light that is on.


Sample Input Copy

7 3

Sample Output Copy

1 5 6 7