我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Switch Game

Problem Description
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 ).

Input
Each test case contains only a number n ( 0< n<= 10^5) in a line.

Output
Output the condition of the n-th lamp after infinity operations ( 0 - off, 1 - on ).

Sample Input
1
5

Sample Output
1
0

http://blog.csdn.net/briup_acmer/article/details/41383905

近期文章

  • The sum problem
  • 通过获取程序窗口句柄显示窗口内的图像
  • C/C++ 统计回文子串······
  • WPF 在Page页中使用Command实现修改的问题?
  • idea部署应用到tomcat的问题
  • Flying to the Mars
  • Deli Deli
  • 请问为什么输入14位的数字学号却显示10位乱组数字,改如何更改呢
  • android中sd卡文件有.db数据库或者是内容提供者么?
  • Weak Number Recognition
  • Matlab带参数求矩阵的秩
  • 语句失灵???一条不被执行的语句
  • delphi toolbar 单击按钮出现菜单,不是右键菜单?
  • Self Numbers
  • Gangs
  • 问一个mui ui 页面传值的问题
  • C 语言调用WindowsAPI 的MCISendString()函数播放音乐
  • Android GPS定位,得到径纬度
  • Java实现倒计时处理业务,要怎么实现? 这个时间可能会进行中发生变化
  • 为什么指针已经指向了0XCDCDCD 但仍不判断为空?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华