9290:Pku2680 Computer Transformation

http://noi.openjudge.cn/ch0206/9290/icon-default.png?t=M0H8http://noi.openjudge.cn/ch0206/9290/描述

A sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer simultaneously tranforms each digit 0 into the sequence 1 0 and each digit 1 into the sequence 0 1. So, after the first time step, the sequence 0 1 is obtained; after the second, the sequence 1 0 0 1, after the third, the sequence 0 1 1 0 1 0 0 1 and so on.

一个由数字组成的序列,在电脑中一开始是数字1.在连续的每步中,计算机同步向序列0变成10和1变成01.所以,在第一步后,获得序列01。在第二部后,序列变成1001.第三步后,变成01101001等等

How many pairs of consequitive zeroes will appear in the sequence after n steps?

在n步以后,序列中将会出现多少对连续的0.


输入

Every input line contains one natural number n (0 < n <= 1000).
每一输入行包含一个自然数n


输出

For each input n print the number of consequitive zeroes pairs that will appear in the sequence after n steps.

对于每一个输入n,输出在n布以后在序列中会出现的连续的0的数量

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值