文件名称:boot
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:609byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
数根
数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数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
数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数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
相关搜索: boot.z
(系统自动生成,下载前可以参看下载内容)
下载文件列表
B.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.