问题 1745 --Switch Game1745: Switch Game
时间限制: 1 Sec 内存限制: 128 MB
提交: 99 解决: 50
[提交][状态][讨论版][命题人:]题目描述
There are many lamps in a line. All of them are off at first. A series
of operations are carried out on these lamps. On the i-th operation, the
lamps whose numbers are the multiple of i change the condition ( on to
off and off to on ).
输入描述
Each test case contains only a number n ( 0< n<= 10^5) in a line.
输出描述
Output the condition of the n-th lamp after infinity operations ( 0 - off, 1 - on ).
样例输入
1
5
样例输出
1
0
来源
[提交][状态]