poj 1519 Digital Roots
来源:互联网 发布:网络致富平台 编辑:程序博客网 时间:2024/05/21 09:06
题目要求:给你一个数字,然后将每位数都相加,如果结果不为各位数,继续加。
解题思路:把每位数都加了然后%9 如果结果为 0 输出9。
为什么要这么弄 我也不知道,只有记住了 太神秘了。
算法来源:discuss。
神秘代码:
谁知道是为什么请留言!!!!
谢谢了
- POJ 1519 Digital Roots
- poj 1519 Digital Roots
- POJ 1519 Digital Roots
- poj 1519 Digital Roots
- POJ 1519 Digital Roots
- POJ 1519:Digital Roots
- POJ 1519 Digital Roots G++
- POJ 1519 Digital Roots -- from lanshui_Yang
- poj 1519 Digital Roots (计算根数字)
- 1519 Digital Roots
- POJ 1519 && HDU 1013 Digital Roots(数论)
- Digital Roots
- Digital Roots
- Digital Roots
- Digital Roots
- Digital Roots
- Digital Roots
- Digital Roots
- 二叉树的前序、中序、后序遍历 查找 删除
- C++一维数组与指针
- 如何利用windosAPI计算程序运行时间 不使用VC的库,也就是说不跨系统,跨编译器
- Hibernate关系映射(1)_一对一单向外键关联
- 自己的心声
- poj 1519 Digital Roots
- 系统信息API
- boost ptime 与 time_t等的转换
- mfc 实现串口通信
- 2010年10月编程语言排行榜 51CTO调查结果
- “本地连接”无法修复
- 分形之父Mandelbrot的TED演讲记录
- MDI应用程序的构成
- Microsoft Win32 to Microsoft .NET Framework API Map