-
数根
数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数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
-
Powerbuilder8.0 Utility Design 100 Cases of 31
Powerbuilder8.0实用程序设计100例之31-40-Powerbuilder8.0 Utility Design 100 Cases of 31-40
- 2023-03-23 10:05:04下载
- 积分:1
-
对任何集体(如你自己的类)的问题描述…
一:问题描述
针对某个集体(比如你所在的班级)中的“人名”设计一个哈希表,使得平均查找长度不超过R,完成相对的建表和查表程序。
二:基本要求
假设人名为中国人姓名的汉语拼音形式。待填入哈希表的人名共有30个,取平均查找长度的上限为2。哈希函数用除留余数法构造,用伪随机探测再散列法处理冲突。
三:实现提示
如果随机函数自行构造,则应首先调整好随机函数,使其分布均匀。人名的长度均不超过19个字符(最长的人名如:庄双双(ZHAGN SHUANG SHUANG)。字符的取码方法可直接利用C语言中的tosacii函数,并可对过长的人名先作折叠处理。
四:需求分析
本演示程序是对哈希表的建立和查找进行演示,主要数据来自自己编写的人名“A~~Z”等字母组成,拼音由开头的字母组成的词组,查找时用伪随机探测再散列法处理冲突。随机产生人名的位置。具体的程序内容在源程序里面有比较详细的解析。程序的运行在下列有详细的介绍。
-one : Problem description against any collective (such as your own classes) of "names" design a hash table. you make the average length of not more than R, completes the construction and Lookup Table procedures. Two : the assumption that the basic requirements were known as the Chinese name of Chinese pinyin form. Hash Table question Enter the names of a total of 30, you take the average length of a maximum of two. Hash functions with a few exception I stay constructed using pseudo-random re-hash detection method to resolve disputes. 3 : Achieving suggested ra
- 2022-01-22 16:42:56下载
- 积分:1
-
一个网络对战扑克游戏的源代码,采用socket连接。JBuilder工程文件...
一个网络对战扑克游戏的源代码,采用socket连接。JBuilder工程文件-a network war poker game"s source code, using socket connection. JBuilder project documents
- 2022-05-23 15:40:50下载
- 积分:1
-
包含网吧管理服务器和客户端,将文件解压后即可放在VB环境下使用。...
包含网吧管理服务器和客户端,将文件解压后即可放在VB环境下使用。-Include a server and a client of netbar manager system,unzip this file and you can application it in VB.
- 2022-08-15 13:45:26下载
- 积分:1
-
可以产生随机网络拓扑(包括waxman等多种模型)的源码
可以产生随机网络拓扑(包括waxman等多种模型)的源码-can have random network topology (including Ms. various models) FOSS
- 2022-03-23 23:04:56下载
- 积分:1
-
CSS模板源代码。您可以使用此文件的源代码来创建你自己的…
CSS templates source codes. You can use this file souce codes to create your own menus.
- 2022-07-08 06:54:53下载
- 积分:1
-
led 背光显示
led 背光显示-bak display
- 2023-04-01 22:30:03下载
- 积分:1
-
针对NSF
针对NSF-14的负载均衡的最短路算法
-NSF-14
- 2022-02-05 22:15:45下载
- 积分:1
-
对于建模工具Visio的具体原理及其使用方法
对于建模工具Visio的具体原理及其使用方法-Visio modeling tool for the specific principles and how to use
- 2022-08-15 08:19:26下载
- 积分:1