-
数列计算
例如,当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
-
基于 fpga 的 jpeg 编码器
这里被提出与 dct jpeg 编码器
表示形式的图像中的颜色从RGB转换为Y′CBCR,组成的一个 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-01-24 17:44:11下载
- 积分:1
-
拉氏法
Laplace method to make mesh
- 2022-02-05 20:15:28下载
- 积分:1
-
通过C++对偶单纯形法
#包括“stdafx.h”
- 2022-03-24 21:57:23下载
- 积分:1
-
线索化二叉树的源程序
线索化二叉树的源程序-clues to the source of Binary Tree
- 2022-02-14 18:04:51下载
- 积分:1
-
非
非线性多分辨率信号的分解,论文及matlab代码-Non-linear multi-resolution signal decomposition, papers and matlab code
- 2023-08-30 21:35:04下载
- 积分:1
-
这是硕士生计算机软件专业组合数学的一个换位法算法演示,仅供参考。...
这是硕士生计算机软件专业组合数学的一个换位法算法演示,仅供参考。-This is the master computer software professional combination of a mathematical algorithm law transposition demonstration purposes only.
- 2023-08-07 02:45:03下载
- 积分:1
-
求非终端结点的算法
求非终端结点的算法-for non-terminal nodes algorithm
- 2022-07-23 13:50:16下载
- 积分:1
-
基于Givens transformation的QR分解。其使用需要调用Givens transformation程序。...
基于Givens transformation的QR分解。其使用需要调用Givens transformation程序。-Givens transformation based on the QR decomposition. Their use need to call Givens transformation process.
- 2022-12-18 18:05:03下载
- 积分:1
-
用于多个离散点拟合光滑曲线的,优化了追赶法,这个例子适用于闭合和不闭合两种情况。当时由于工程情况,写的急,代码不好看,但是很好用。为了方便传递参数,我做了一个链...
用于多个离散点拟合光滑曲线的,优化了追赶法,这个例子适用于闭合和不闭合两种情况。当时由于工程情况,写的急,代码不好看,但是很好用。为了方便传递参数,我做了一个链表,用时候根据自己情况可以修改,核心算法不动即可。-point for a number of discrete smooth curve fitting, and optimized to catch up with the law applicable to this case is not closed and the closure of two. At that time, because the situation, was the most aggressive, the code does not look good, but good use. To facilitate the transmission parameters, I have done a linked list, when used according to its own circumstances can change, the core algorithm can be fixed.
- 2022-03-17 18:50:28下载
- 积分:1