-
数列计算
例如,当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
- 2022-03-12 08:20:11下载
- 积分:1
-
JAMA: A Java Matrix Package 用于JAVA开发中的矩阵运算
JAMA: A Java Matrix Package 用于JAVA开发中的矩阵运算-JAMA : A Java Matrix Package for the development of Java-matrix calculation
- 2022-02-22 03:54:10下载
- 积分:1
-
contains five kinds of sorting algorithm using vb achieve
包含5种排序算法,利用vb实现-contains five kinds of sorting algorithm using vb achieve
- 2022-08-15 17:18:14下载
- 积分:1
-
此程序用提升法实现第二代小波变换,我用的是非整数阶小波变换...
此程序用提升法实现第二代小波变换,我用的是非整数阶小波变换-the procedure used to upgrade method is the second generation wavelet transform, I use a non-integer wavelet transform
- 2022-03-18 09:24:55下载
- 积分:1
-
彩色图像的人脸检测
face detection in color image
- 2022-07-25 12:51:42下载
- 积分:1
-
智能车电磁组国一主程序
自己参加飞思卡尔智能车竞赛程序,上传程序为程序中的核心部分,涉及信号采集,PID算法,电机控制,舵机控制,,希望对大家有所帮助。低层驱动为自己编写,比较乱就不上传了,大家可以自己编写
- 2022-06-15 04:57:43下载
- 积分:1
-
数值计算
牛顿迭代法.m
简单迭代法.m
雅克比迭代法.m
- 2022-12-30 08:35:03下载
- 积分:1
-
割线算法;
数值计算算法:割线算法的数学写的帕斯卡尔要找到解决方程f(x)=0 给定的初始近似值P0和P1: 输入:初始近似值P0,P1;公差TOL; 迭代N 0的最大数目。 输出:近似解p或 该算法失败的消息。
- 2022-02-10 14:26:53下载
- 积分:1
-
A program to demonstrate the optimization process of ant colony optimization for...
A program to demonstrate the optimization process of ant colony optimization for the traveling saleman problem (TSP). The cities are shown as red circles, the pheromone on the connections between them (fully connected graph) by gray lines. The darker the grey, the more pheromone is currently on the edge. During the optimization, the currently best found tour is drawn in red. To run the optimization, first create a random TSP, then create an ant colony, and finally run the optimization.
- 2022-02-19 22:51:42下载
- 积分:1
-
wsn路由技术
无线传感器网络的一些节能路由算法代码,相比多跳路由以及LEACH路由算法的一些代码,通过MATLAB仿真可以通过,在延长网络生命周期方面有一定的效果
- 2022-02-15 21:13:21下载
- 积分:1