Four in a Row
2014-01-13 15:45
239 查看
Description
Given a positive integer, tell whether it is equal to the sum of four consecutive integers.
Input
A positive integer n ( n <2^31 ), each case will be on a separate line.
A zero (0) denotes the end of input.
Output
The phrase “ is not the sum of four consecutive integers.”
or the phrase “ is the sum of four consecutive integers.”,
where is the number in question.
Sample Input
2 5 41 82 0
Sample Output
2 is the sum of four consecutive integers. 5 is not the sum of four consecutive integers. 41 is not the sum of four consecutive integers. 82 is the sum of four consecutive integers.
代码
相关文章推荐
- dos命令行不能输入中文怎么办该如何解决
- 自己写的第一个视图(为了纪念)
- <<执行力>>阅读笔记
- VBS 模拟Try-Cathch异常处理的方法
- Pig基础
- 有关iOS GCD上的一些资料。
- django 实战例子
- [MS SQL]实用SQL查询语句集锦
- sip vs xmpp,
- oracle hash join和nested loop下的驱动表相关测试
- 高精度减法
- java中final关键字使用示例详解
- Android混淆带有so文件的工程
- ftp服务器安装
- 阳光心态塑造
- win8 内核调试
- 七巧桥游戏对团队建设的启迪
- 选择:建立价值体系优先
- Android启动另一个apk程序
- 最简单的MySQL replication配置过程.