-
数根
数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数N(0≤N≤1000000000000)的...
数根
数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数N(0≤N≤1000000000000)的根。
输入:
输入有多个案例。每一个案例为一行,每行只有一个整数N。当输入的N是-1时,输入结束。
输出:
每一个案例输出一行。每行只有一个数字,就是N对应的数根。
Sample input
39
-1
Sample output
3-Number of root number also has roots do? There is! The number of roots is to a number of different values on the digital sum until they have been a number of up to one. Please write a program to calculate an arbitrary number N (0 ≤ N ≤ 1000000000000) roots. Input: Enter a number of cases. Each case for the line, each line is only an integer N. When the input of N is-1, the input end. Output: the output line of each case. There is only one number per line, that is, N corresponds to the number of roots. Sample input 39-1 Sample output 3
- 2023-09-05 21:25:03下载
- 积分:1
-
动态规划解决0
动态规划解决0-1背包问题-0-1 knapsack problem
- 2023-02-13 03:20:03下载
- 积分:1
-
计量工具箱,来自http://www.spatial
计量工具箱,来自http://www.spatial-econometrics.com/
-Econometrics toolbox, from http://www.spatial-econometrics.com/
- 2022-02-09 11:34:42下载
- 积分:1
-
Image Processing VHDL Code, Including Stitching & Colour Blending Module
Image Processing VHDL Code,
Including Stitching & Colour Blending Module-Image Processing VHDL Code, Including Stitching & Colour Blending Module
- 2022-03-11 16:52:01下载
- 积分:1
-
PHP编码规范(第一版)(CHM),这是程序的一个本质特征…
PHP编码规范(第一版)(CHM),这是程序员必备的编码规范了,非常实用。-PHP coding standard (first edition) (CHM), which is an essential feature of programmers coding standard, very practical.
- 2022-02-03 11:03:00下载
- 积分:1
-
在mfc中简单运动的正方形,其原理可为有些初学者作出一点贡献...
在mfc中简单运动的正方形,其原理可为有些初学者作出一点贡献-Now mfc中Canals hung cavity side of bridge, such as the source of形Hao, 其 braise原bleed at the nose strip为Which Course embankment laugh krypton brazing献instance, Liao Yu
- 2022-03-06 09:51:03下载
- 积分:1
-
arm 指令中文参考书 相当不错
初学者可以入门用。老手也可作参考!...
arm 指令中文参考书 相当不错
初学者可以入门用。老手也可作参考!-arm directive Chinese reference books quite a beginner can use induction. Veterans also can be used as a reference!
- 2022-03-12 22:37:22下载
- 积分:1
-
128Mb DDR verilog source code
128Mb DDR verilog源程序-128Mb DDR verilog source code
- 2022-04-02 12:05:15下载
- 积分:1
-
这是一个俄罗斯方块小游戏的程序,可能不是很好,希望大家见谅...
这是一个俄罗斯方块小游戏的程序,可能不是很好,希望大家见谅-This is a game of Tetris procedures, may not be very good, hope that we will be forgiven! !
- 2022-05-09 01:43:29下载
- 积分:1
-
a cohort achieved with the Ferry algorithm
一个用队列实现的渡船算法-a cohort achieved with the Ferry algorithm
- 2023-02-23 20:55:03下载
- 积分:1