-
正整数x 的约数是能整除x 的正整数。正整数x 的约数个数记为div(x)。例如,1,2,5,10 都是正整数10 的约数,且div(10)=4。设a 和b 是...
正整数x 的约数是能整除x 的正整数。正整数x 的约数个数记为div(x)。例如,1,2,5,10 都是正整数10 的约数,且div(10)=4。设a 和b 是2 个正整数,a≤b,找出a 和b之间约数个数最多的数x。
对于给定的2 个正整数a≤b,编程计算a 和b 之间约数个数最多的数。
数据输入
输入数据由文件名为input.txt的文本文件提供。文件的第1 行有2 个正整数a和b。
结果输出
程序运行结束时,若找到的a 和b 之间约数个数最多的数是x,将div(x)输出到文件output.txt中。
输入文件示例 输出文件示例
input.txt output.txt
1 36 9
-Positive integer x can be about a few of the positive integer x divisible. Positive integer x the approximate number recorded as the number of div (x). For example, 1,2,5,10 are about 10 positive integer number, and div (10) = 4. Set a and b are two positive integers, a ≤ b, to find a and b between about a few number of the largest number of x. For a given two positive integers a ≤ b, Programming calculated a and b between about a few number of the largest number. Data entry input data from the document text file named input.txt provide. File line 1 has two positive integers a and b. The results run the end of the output, if found between a and b of about a few number o
- 2023-04-13 05:20:03下载
- 积分:1
-
QR算法得到一个对称的特征值,三对角n×n矩阵
QR ALGORITHM To obtain the eigenvalues of a symmetric, tridiagonal n by n matrix
- 2022-03-23 18:48:00下载
- 积分:1
-
Win32 Assembly to write small programs, including Source Code!
-Win32 Assembly写的小程式,含 Source Code! -工程计算机,可达112 bits !--Win32 Assembly to write small programs, including Source Code!- Works the computer, up to 112 bits!
- 2023-06-10 01:35:04下载
- 积分:1
-
浮点转换器,可以对十进制定点数、浮点BCD码和二进制浮点操作数之间进行相互转换。...
浮点转换器,可以对十进制定点数、浮点BCD码和二进制浮点操作数之间进行相互转换。-float converters, and can set the decimal points. BCD floating-point and binary floating-point operation between several mutual conversion.
- 2023-06-13 08:20:04下载
- 积分:1
-
希尔排序
希尔排序-Sort Hill
- 2022-03-01 00:09:40下载
- 积分:1
-
求矩阵的最大特征值
求矩阵的最大特征值-matrix for the largest eigenvalue
- 2022-01-21 21:13:50下载
- 积分:1
-
这里面是关于电气常用公式计算,对电子电气类学习参考有一定的价值...
这里面是关于电气常用公式计算,对电子电气类学习参考有一定的价值-There is a commonly used formula of electrical, electronic reference Electric learning has its value
- 2022-03-17 22:45:04下载
- 积分:1
-
利用自动机上加语义动作实现对所有常数的正确处理以及显示其结果。...
利用自动机上加语义动作实现对所有常数的正确处理以及显示其结果。-The use of automatic machines plus semantic actions to achieve the proper handling of all constants and display the results.
- 2022-01-28 03:16:49下载
- 积分:1
-
传热学二维稳态C++程序
单位长度为一。内外壁分别维持450度和50度。管道热导率1.05W/(m.k),求每米长管道热损失。
- 2022-05-25 20:51:34下载
- 积分:1
-
detailed algorithm design
详细龙贝格算法设计-detailed algorithm design
- 2022-02-02 15:07:27下载
- 积分:1