反转数
来源:互联网 发布:成都金域名人酒店地址 编辑:程序博客网 时间:2024/04/28 12:20
今天朋友介绍了一个网站叫http://projecteuler.net/,非常有意思,其中有这么一道题:
Some positive integers n have the property that the sum [ n + reverse(n) ] consists entirely of odd (decimal) digits. For instance, 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers reversible; so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either n or reverse(n).
There are 120 reversible numbers below one-thousand.
How many reversible numbers are there below one-billion (109)?
写了一段C程序,在我的机器上花了138秒求出了解,后来在朋友的指点下,优化成67秒。
跑去网贴上一看,有个牛人的程序更快,在我的机器上只要跑17秒,汗一个。
- 反转数
- 反转数
- 数反转
- 二进制数反转
- 二进制数反转
- 二进制数反转
- 两个数反转相加
- 实现数的反转
- 反转二进制数
- 反转二进制数
- 反转整形数
- [业余学习]整形数反转
- 题目1064:反序数 (数字反转)
- java:输入一个数,反转后输出
- 将无符号数对应二进制反转
- Reverse Integer反转int数问题
- Reverse Integer(反转整型数)
- 1094: 【白书习题】数的反转
- sql+php
- 简洁、明晰!数据库设计三大范式应用实例剖析[转载]
- Spring的事务管理2.0与1.2.8的区别
- 今天天气好冷
- 2007年ACM国际大学生程序设计竞赛总决赛试题B,C
- 反转数
- 今天是个好日子
- 关于程序员的7种武器
- 几种身份认证方式的分析
- 关闭笔记本显示器
- vim常用操作入门
- JAVA学习笔记一:public和main方法
- getopt_long
- 无知者无畏——中国程序员和印度程序员的对话