VmatrixOJ--[Algorithm] Rabbit

pentaho-aggdesigner-algorithm-5.1.5-jhyde-API文档-中文版.zip 赠送jar包:pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar; 赠送原API文档:pentaho-aggdesigner-algorithm-5.1.5-jhyde-javadoc.jar; 赠送源代码:pentaho-aggdesigner-algorithm-5.1.5-jhyde-sources.jar; 赠送Maven依赖信息文件:pentaho-aggdesigner-algorithm-5.1.5-jhyde.pom; 包含翻译后的API文档:pentaho-aggdesigner-algorithm-5.1.5-jhyde-javadoc-API文档-中文(简体)版.zip; Maven坐标:org.pentaho:pentaho-aggdesigner-algorithm:5.1.5-jhyde; 标签:aggdesigner、pentaho、algorithm、jar包、java、API文档、中文版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结 立即下载

Description

The rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one pair of kid rabbits every month. And after m months, the kid rabbits can become adult rabbits.

As we all know, when m=2, the sequence of the number of pairs of rabbits in each month is called Fibonacci sequence. But when m<>2, the problem seems not so simple. You job is to calculate after d months, how many pairs of the rabbits are there if there is exactly one pair of adult rabbits initially. You may assume that none of the rabbits dies in this period.

Input

The input may have multiple test cases. In each test case, there is one line having two integers m(1<=m<=10), d(1<=d<=100), m is the number of months after which kid rabbits can become adult rabbits, and d is the number of months after which you should calculate the number of pairs of rabbits. The input will be terminated by m=d=0.

Output

You must print the number of pairs of rabbits after d months, one integer per line.

Sample input

2 3
3 5
1 100
0 0

Sample output

5
9
1267650600228229401496703205376

Code: 

#include<iostream>
#include<cstring>
using namespace std;
const int NUM = 40;
const int ALL = 101;
char number[101][40];
void add(char *front,char * rear,char * result)
{
	int count = 39;
	int ahead = 0;
	for(int i = 39; i >= 0; i-- )
	{
		int temp = front[count] -48 + rear[count] - 48 + ahead ;
		if(temp >= 10)
		{
			ahead = 1;
			result[count] = temp +38;
		}
		else
		{
			result[count] = temp + 48; 
			ahead = 0;
		}
		count --;
	 }
}
void rabbit(char front[][40],int m, int d) 
{
	for(int i = m; i < d+m; i++)
	{
		add(front[i-m],front[i-1],front[i]);
	}
}
void show(char * front)
{
	int recordfront = 0;
	for(int i = 0; i < NUM; i++)
	{
		if(front[i] != '0')
		{
			recordfront = i;
			break;
		}
	}
	for(int i = recordfront; i < NUM ;i++)
	{
		cout << front[i];
	}
	cout << endl;
	
}
int main()
{
	int m,d;
	while(cin >> m >> d)
	{
		if(m == 0 && d == 0)
			break;
		else
		{
	        for(int i = 0; i < ALL; i++)
		    {
			    for(int j = 0; j < NUM; j++)
			    {
			        number[i][j] = '0';

			    }
		
		    }
		    for(int i = 0; i < m; i++)
		    {
		        number[i][NUM-1] = '1';
		    }
		    rabbit(number,m,d);
		    show(number[d+m-1]);
		}
	}
	return 0;
 } 

 

 

pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar 立即下载

相关推荐

pentaho-aggdesigner-algorithm-5.1.5-jhyde.zip

org / pentaho / pentaho-aggdesigner-algorithm / 5.1.5-jhyde / pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar,解决maven引入hive的jar包时依赖报错Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in xxx的问题(不要积分,免费提供给大家,如有问题可以私信我发给你)

Rabbit

Rabbit Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other) Total Submission(s) : 49   Accepted Submission(s) : 12 Font: Times New Roman | Verdana | Georgia Fon

哇咔咔的升级之路~ 771

IEEE Transactions模板中参考文献作者缩写、期刊名缩写

本文章记录如何在IEEE Transactions的模板中,解决参考文献的作者缩写、期刊名字缩写的问题。

weixin_43981621的博客 1万+

[sicily online]1029. Rabbit

/* 1,大整数加法,用string模拟 2,用一个数组模拟兔子成长过程 Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description The rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one

qiuchenl的专栏 1054

cesium加载天地图、OSM、谷歌底图

以上示例是加载矢量底图,若要加载影像或者其他只需要更换相应的url,在WebMapTileServiceImageryProvider中还要更改layer参数。url中’‘vec_w’,一些其他风格,基于CRAT渲染,两种方法效果差别不大。有两种方法加载天地图分别是。对应投影样式,具体可看。还要谷歌的一些卫星底图。

qq_44897914的博客 3000

耶鲁大学《博弈论》课程——逆向归纳

耶鲁大学《博弈论》课程——逆向归纳

ZYLer_的博客 7870

解决IDEA中打包时报:Could not transfer artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde问题

解决IDEA中打包时报:Could not transfer artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde问题 ) 问题:今天写一个对JSON文件进行分析的UDF和UDTF程序,当我准备对程序进行打包上传到服务器的时候,却报了错这个错误: Could not transfer artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde from/

懵懂bigdata象 7057

MinerU安装指南:从源码到验证的完整流程

本文详细介绍了MinerU文档转换工具的安装流程,从源码获取、依赖安装到验证步骤,提供了完整的安装指南和常见问题解决方案。特别适合技术写作者和开发者快速部署这款高效的文档转换工具,提升工作效率。

weixin_29243279的博客 544

Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyde 解决方案

Spark学习,Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyde 解决方案

Tangnin的博客 8664

STM32版CCD线性摄像头寻线寻迹小车_stm32接ccd

目前大多数的小车寻线寻迹都是用红外对管寻线,这是比较简单也比较成熟的技术方案,且成本也低。本文将介绍使用CCD线性摄像头寻线寻迹。TSL1401 线性传感器由一个 1x128 的光电二极管阵列、相关的电荷放大电路以及一个内部像素数据保功能组成。内部像素数据保功能可以为所有像素点提供同时积分的开始和停止时间。该阵列由 128 个像素组成,每个像素的感光面积为 3,524.3 平方微米。像素之间的间隔为 8μm。内部控制逻辑简化了操作,该模块需要串行输入(SI)信号和时钟信号(CLK)。

2401_87557129的博客 3229

【ubuntu】如何搭建AFTR+B4环境

为何要使用ipv6 目前ipv4地址已经不够用了,而IPv6采用128位地址长度,几乎可以不受限制地提供地址。而且ipv6具有更高的安全性。 主流的ipv6方案 1.双栈方案 :所有设备同时支持IPv4/IPv6协议栈,核心理念在于其传送网同时支持IPv4和IPv6 2.DS-Lite方案 :IPv4‐in‐IPv6 隧道和 NAT 这两个基本技术,同时支持IPV4与IPV6,对于ipv4用户,可以通过ipv6隧道与ipv4业务平台实现通信;针对ipv6用户,可直接通过ipv6网络通信。 3.6RD方案 :

weixin_43863426的博客 2723

[sicily]1029. Rabbit

1029. Rabbit Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description The rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one pair of kid rabbits e

luohuang0423的专栏 624

港口集装箱码头运营FlexSim仿真

列队4中的集装箱会根据不同类型的集装箱会放置在不同的堆场,因此根据前面对集装箱设置的标签Type的数值不同,设置不同的发送端口。集装箱到达列队3后,会有70%的集装箱到达堆场,30%的集装箱运出港口,因此在Queue列队3的Flow界面设置按照百分比发送端口,其中70%发送到端口1,即发送到列队4等待进入堆场,30%发送到端口2,即发送至出闸口。通过上述对比表格可以看出,当集卡数量在10的时候,岸桥和场桥的设备利用率达到了最高,当集卡数量为12的时候场桥1和场桥3的利用率有所下降,因此综合考虑。

m0_72514516的博客 1331

Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in nexus-aliyun

原因 mvn配置文件中指定的镜像仓库中没有对应的jar包,后来百度了很多包括google,github上看了很多解决办法以后才知道,原来这个jar是在spring插件仓库里。所以有了后面的对mvn配置文件修改。 解决办法 <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云spring插件仓库</name> <url>http

Mr.Zheng的博客 8480

android13删除录屏权限提示框-去除录屏提示

在Android 13中,当应用请求屏幕录制权限时,系统会弹出一个权限提示框,要求用户明确授权。这个提示框是为了增强用户隐私保护,让用户知道有应用尝试录制屏幕。但是,在某些情况下,开发者可能希望避免显示这个提示框,以提供更流畅的用户体验。本文将介绍如何在Android 13中删除录屏权限提示框。

zhutoubenben的专栏 1880

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyde Maven下载不下来

找了很多文章都提供以下两种方式 1)设置maven镜像仓库 2)pom文件增加 不过我试了都没有解决问题。 最终直接下载缺失的包,地址如下 https://public.nexus.pentaho.org/#browse/search=keyword=pentaho-aggdesigner-algorithm 将jar和pom放到maven对应路径下即可。 pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar pentaho-aggdesigner-algorithm-

DaiSnow的博客 6250

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde爆红

pom文件导入org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde报错

weixin_43744992的博客 4667

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

Failure to transfer org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyd

maven导入依赖包的时候报错: Failure to find org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in http://maven.aliyun.com 意思是我们maven配置的阿里云仓库没有这个依赖. 从网上看了多篇帖子,在maven的仓库添加miroor源,添加spring-io依赖等,均没有解决这个问题. 最后在pom.xml添加下面的依赖才解决了问题: <repositories> <re

weixin_43586713的博客 1624

兔子

Problem Description The rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one pair of kid rabbits every month. And after m months, the kid rabbits can become adu

博文的专栏 561

Failure to find org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in http://maven.aliyun.com

问题 编写Hive自定义UDF以及UDTF函数时,测试都通过了,但是在附带依赖打包的时候发现了一个错误! 错误代码: Failure to find org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in http://maven.aliyun.com/nexus/content/repositories/central/ wa...

Mr.Zheng的博客 7409

Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde解决方法

Idea中hive的 org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde 包导入问题及解决 idea导入hive依赖命令: <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.7.3&

QQ3434223245的博客 7717

maven报错总结

在这个包下载完后,可以把新增的阿里云spring-plugin镜像仓库注释掉,依旧优先使用阿里云公共仓库。是因为这个包不在阿里云公共maven镜像仓库上,需要添加一个新的镜像仓库,修改maven的。如果是idea开发,需要重启idea,刷新依赖即可。在Spark连接Hive导入相关maven依赖时。

m0_67729411的博客 802

Could not find artifact org.pentaho:pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde in ali maven 解决方式

spark

m0_72898076的博客 1576

maven打包报错 Failure to find org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyde

Hive版本:2.3.3 maven版本:3.6.1 先说解决方法:不需要手动下载依赖包,使用自动下载方法。 在练习Hive的自定义函数时,使用maven打包,结果报错了 Could not resolve dependencies for project org.example:myhiveself:jar:1.0-SNAPSHOT: Failure to find org.pentaho:pentaho-aggdesigner-algorithm:jar:5.1.5-jhyd e in http:/.

zxctime的博客 2万+
上一篇: VmatrixOJ--IP and QQ
下一篇: PTA 6-1单链表逆转
广州彭于晏
博客等级 码龄8年 10粉丝 33原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值