我爱占星网 我爱占星网
首页
编程
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

近期文章

  • Treasure the new start, freshmen!
  • mysql插入数据库一直报错 怎么修改
  • 想用vs2008做一个图表?
  • 求大神, 下棋上下移动后左右移动会出问题
  • asp.net mvc 使用连接登录时如何禁止put属性
  • 用verilog语言设计一个方波产生器
  • 基本的云服务器购买与部署
  • myeclipse10不小心恢复了myeclipse tomcat server配置怎么办
  • java web,关于封装入库的问题?
  • 图像自动识别app怎么实现
  • ipad 的闪退问题有哪些
  • vs2008+qt4.6 可以生成,调试出现“无法启动程序。。。,由于应用配置不正确”
  • highcharts横坐标为时间,怎么跟数据点一一对应
  • Dictionary<string, DataTable> dic 取值问题
  • 一个关于java对象的内存指向的问题菜鸟问题
  • 关于TFS内容导入到数据库的方法
  • oracle自定义函数的date类型输入问题
  • winform,dropdownlist数据源赋为空后的问题?
  • Extjs更换树状图节点图标问题。
  • 爬取天眼查的企业信息

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华