-
数根
数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数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
-
快速排序的基本算法
快速排序的基本算法-basic Quick Sort Algorithm
- 2023-06-04 15:35:03下载
- 积分:1
-
Extraction equation coefficient, has a certain versatility, there are less than...
提取方程系数,具有一定的通用性,有不足指出,请高手指出。-Extraction equation coefficient, has a certain versatility, there are less than that the requested expert pointed out.
- 2022-01-28 19:17:27下载
- 积分:1
-
sap 的abap编程 实现alv的多层输出 调用系统方法
sap 的abap编程 实现alv的多层输出 调用系统方法-alv abap programming sap of the multi-output system, method calls
- 2022-09-05 03:05:04下载
- 积分:1
-
一个远程文件传送的程序――Client
一个远程文件传送的程序――Client-a remote file transfer procedures-- Client
- 2022-07-24 20:50:59下载
- 积分:1
-
实现2ASK,2FSK,2PSK,MSK,GRAY转换自然码
实现2ASK,2FSK,2PSK,MSK,GRAY转换自然码-realise 2ASK,2FSK,2PSK,MSK,GRAY change to natural code。
- 2022-05-22 17:36:32下载
- 积分:1
-
一个java漂亮外观的源码,支持窗体透明,有兴趣的朋友看看。...
一个java漂亮外观的源码,支持窗体透明,有兴趣的朋友看看。-Beautiful appearance of a java source code to support transparent form, interested to see friends.
- 2023-04-01 04:05:04下载
- 积分:1
-
USB的中文资料
USB中文数据说明 -USB Chinese data
- 2022-03-22 14:02:13下载
- 积分:1
-
针对TI公司的MSP53C39,介绍了FM语音合成算法的基本原理和FM数据文件格式,合成算法生成工具TI_FM的使用方法...
针对TI公司的MSP53C39,介绍了FM语音合成算法的基本原理和FM数据文件格式,合成算法生成工具TI_FM的使用方法-For TI" s MSP53C39, speech synthesis FM introduced the basic principles of algorithm and data file formats FM, synthesis algorithm to generate the use of tools TI_FM
- 2022-06-26 23:22:40下载
- 积分:1
-
一个vc++写的推箱子游戏,学2D的朋友可以参考,学3D的也有一定价值...
一个vc++写的推箱子游戏,学2D的朋友可以参考,学3D的也有一定价值-A vc++ Written Sokoban games, school friends can refer to 2D, 3D study also has some value
- 2022-08-23 14:41:43下载
- 积分:1