登录
首页 » 算法 » 正整数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 是...

于 2023-04-13 发布 文件大小:1.43 kB
0 165
下载积分: 2 下载次数: 1

代码说明:

正整数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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 这个是数学上非常有名的菲波那契数列,对于初学VC的人来说是个很有意思的小程序,一对兔子出生二个月后,每个月会生一对小兔子,小兔子从第二个月起也可以生一对新的小兔
    这个是数学上非常有名的菲波那契数列,对于初学VC的人来说是个很有意思的小程序,一对兔子出生二个月后,每个月会生一对小兔子,小兔子从第二个月起也可以生一对新的小兔子,N个月后,共有多少对兔子?程序对学生成绩进行统计,并输出各科平均成绩。-very famous Fibonacci series, for the beginners VC is a very interesting small program, a month after the birth rabbits, each month : a small rabbit, the rabbit small starting from the first 12 months of Health also a new small rabbits, N months later, the total number of the rabbit? Procedures for student performance statistics, and output sections average scores.
    2022-08-14 14:57:48下载
    积分:1
  • 规模的局部旋转
    将N乘N矩阵A=(A(I,J))乘以
    2022-02-15 00:14:29下载
    积分:1
  • 这是我所有的家当哦,c语言源程序,其中有C语言二级考试的题目呢!...
    这是我所有的家当哦,c语言源程序,其中有C语言二级考试的题目呢!-This is all my family"s, oh, c source language, which has two C-language examination questions!
    2022-12-04 10:55:03下载
    积分:1
  • 贝塞尔曲线
    构建三次贝塞尔曲线 C0,......,Cn-1 中 参数形式,Ci 由 (xi(t),yi(t)) = (a0(i) + a1 (i) * t + a2 (i) * t ^2 + a3 (i) * t ^3, b0(i) + b1 (i) * t + b2 (i) * t ^2 + b3(i)*t^3) 0 为 < = t < = 1 由左终结点 (x(i),y(i)), 离开了 guidepoint (x+(i),y+(i))、 右端点 (x(i+1),y(i+1)) 和 右 guidepoint (为每个 i x-(i+1),y-(i+1)) = 0,1,......,n-1 ; 输入的 n,((x(i),y(i)),我 = 0,...,n), ((x+(i),y+(i)),我 = 0,...,n-1), ((x-(i),y-(i)),我 = 1,...,n)。 输出系数 (a0(i)、 a1(i)、 a2(i)、 a3(i)、 b0(i)、 b1(i)、 b2(i)、 b3(i)、 我 = 0,...,n-1)。
    2022-02-16 09:27:40下载
    积分:1
  • matlab编写的流体计和传热程序
    matlab编写的流体计算和传热程序-Matlab calculations prepared by the fluid and heat transfer procedures
    2022-03-21 07:37:35下载
    积分:1
  • matlab仿真硬件时用的定点化仿真
    应用背景matlab仿真硬件时用的定点化仿真,一般用matlab 直接生成的滤波器响应仿真,因为结果是浮点的,所以和真实硬件计算出的结果差别很大。所以应当进行定点化处理,再检查响应曲线,在硬件设计(FPGA)就应该提前清楚到底要多和位的精度。关键技术输入参数是归一化的浮点数以及位宽,bit_floor.m用来仿真低位直接截断后的效果。bit_round.m是硬件按真正的四舍五入截断处理后的效果。bit_round_hw.m是仿真硬件处理里简化版四舍五入。
    2022-12-06 11:40:03下载
    积分:1
  • 这是一个用visualprolog7.0编写的一个专家系统的实例
    这是一个用visualprolog7.0编写的一个专家系统的实例-This is a visualprolog7.0 prepared by an expert system examples
    2022-01-27 12:36:02下载
    积分:1
  • 菜单 com teclado matricial 3 x 4 e pic
    埃斯特角 projeto mostra 科摩 usar um teclado matricial 3 x 4 com pic 没有 ccs,criação de ilustra um 菜单 de opções usando (开关箱) 段控制 de motores de 帕苏、 com 帕苏 completo、 微帕苏等
    2023-08-01 12:40:03下载
    积分:1
  • FibnachC
    实现超长位数的Fibnach数列的计算程序,用C++语言实现。-FibnachC
    2022-07-27 19:49:59下载
    积分:1
  • MATLAB FIELD II
    超声仿真程序,用于超声成像的算法仿真,亲测好用。Field_II是丹麦超声专家J. A. Jensen等利用声学原理设计的一个超声系统。它可以仿真超声探头所形成的声场和超声图像等。
    2023-08-11 04:20:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载