Problem 2520 --Computer Transformation

2520: Computer Transformation

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $3$ 正确数量 $2$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 递推
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. 

How many pairs of consequitive zeroes will appear in the sequence after n steps?
Every input line contains one natural number n (0 < n <= 1000).
For each input n print the number of consequitive zeroes pairs that will appear in the sequence after n steps.
2
3
1
1

推荐代码 查看2520 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$104 $ms] 计爱玲 201392 2018-02-02 17:45:02
内存最少[$11172 $KB] 计爱玲 201392 2018-02-02 17:45:02
第一AC 计爱玲 201392 2018-02-02 17:45:02
第一挑战 计爱玲 201392 2018-02-02 17:45:02

赛题来源/所属竞赛 NA N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛
1406 安财贸20190918晚上测试 2019-09-18 17:30:00 请登录