登录
首页 » 算法 » 数列计算

数列计算

于 2022-03-12 发布 文件大小:293.00 B
0 207
下载积分: 2 下载次数: 1

代码说明:

例如,当k=3时,这个序列是: 1,3,4,9,10,12,13,… (该序列实际上就是:3^0,3^1,3^0+3^1,3^2,3^0+3^2,3^1+3^2, 3^0+3^1+3^2,…) 请你求出这个序列的第N项的值(用10进制数表示)。 例如,对于k=3,N=100,正确答案应该是981。 输入格式 输入只有1行,为2个正整数,用一个空格隔开: k N (k、N的含义与上述的问题描述一致,且3≤k≤15,10≤N≤1000)。 输出格式 输出为计算结果,是一个正整数(在所有的测试数据中,结果均不超过2.1*10^9)。(整数前不要有空格和其他符号)。 样例输入 3 100 样例输出 981  

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

发表评论

0 个回复

  • 近似方
    有一个函数,你只需要按照源代码中的说明和近似你想要的
    2022-02-13 14:31:45下载
    积分:1
  • 测试在Dev
    测试在Dev-C++中的C语言编程,具体测试在程序退出之前进行暂停。我的作品-test in Dev- C of C programming language, the specific test procedures for withdrawal before the suspension. My work
    2022-06-26 17:18:13下载
    积分:1
  • rc5algorithm
    #定义选项
    2022-03-05 20:30:25下载
    积分:1
  • DPCM编码的联合信源信道译码,这是一个很重要的benchmark程序
    DPCM编码的联合信源信道译码,这是一个很重要的benchmark程序-DPCM coding joint source channel decoder, which is a very important benchmark procedures
    2022-05-25 02:18:57下载
    积分:1
  • svm实现多类分类
    支持向量机在数据挖掘方向的成功使得该项技术在很多实际领域中得到广泛应用,这套代码就是在通过MATLAB来实现svm的多分类,包括对数据的预处理,样本数据的训练和预测仿真。希望对初学者有帮助。
    2022-03-10 13:31:18下载
    积分:1
  • 一个3,9码生成动态库
    一个3,9码生成动态库- 3,9 yard productions dynamic storehouses
    2023-03-29 20:00:03下载
    积分:1
  • The cart with an inverted pendulum, shown below, is "bumped" with an impulse f...
    The cart with an inverted pendulum, shown below, is "bumped" with an impulse force, F. Determine the dynamic equations of motion for the system, and lin earize about the pendulum s angle, theta = Pi (in other words, assume that p endulum does not move more than a few degrees away from the vertical, chosen to be at an angle of Pi). Find a controller to satisfy all of the design re quirements given below. -The cart with an inverted pendulum, shown below, is "bumped" with an impulse force, F. Determine the dynamic equations of motion for the system, and lin earize about the pendulum s angle, theta = Pi (in other words, assume that p endulum does not move more than a few degrees away from the vertical, chosen to be at an angle of Pi). Find a controller to satisfy all of the design re quirements given below.
    2022-03-17 02:37:20下载
    积分:1
  • FFT algorithm version of the C language description of classes.
    FFT 算法的C语言班版描述。本人亲自编写,希望对你有用。-FFT algorithm version of the C language description of classes.
    2022-03-04 05:48:04下载
    积分:1
  • RBF神经网络PID控制程序
    利用径向基神经网络整定的PID控制,调节PID控制器的Kp、Ki、Kd三个参数,输入是方波和1,相应速度快,三个参数变化明显,内涵中文注释。
    2023-05-19 07:20:03下载
    积分:1
  • 智能循迹小车
    应用背景本次智能小车设计是在全国电子设计大赛的背景下,省区选拔第一阶段,我和两名队友协作努力,一起完成整个电路的硬件设计,和算法。获得区级三等奖,成功进入国家级的初赛。关键技术本次智能小车的关键设计在于电路的选择和算法的实现。电路我采用最简单的51单片机作为MCU,对于循迹完全足够了,红外传感器既可以循迹,也可以避障。
    2023-08-26 16:45:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载