Computer Transformation(https://acs.jxnu.edu.cn/problem/HDU1041)

描述:

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 consecutive zeroes pairs that will appear in the sequence after n steps.

由一位数字组成的序列,电脑首先写入数字1.在每个连续的时间步骤中,电脑会同时将每个数字0转为10,每个数字1转为01.那么,在第一个时间步骤后,获得序列01,接着获得序列1001,再然后为01101001,并以此类推.那么在n个时间步骤后,序列当中会有多少对约0呢?

输入:每个输入行有一个自然数n(0<n<1000).

输出:每个输出行为经过n个时间步骤后序列出现约0的对数.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example: Invalid: `{ presets: [{option: value}] }` Valid: `{ presets: [['presetName', {option: value}]] }` For more detailed information on preset configuration, please see https://babeljs.io/docs/en/plugins#pluginpresets-options. (While processing preset: "/Users/helei/work/study/os-front/node_modules/@vue/cli-plugin-babel/preset.js") at Logger.error (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/logger.js:41:11) at OptionManager.mergeOptions (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:226:20) at /Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14 at /Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22 at Array.map (<anonymous>) at OptionManager.resolvePresets (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20) at OptionManager.mergePresets (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10) at OptionManager.mergeOptions (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14) at OptionManager.init (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12) at File.initOptions (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/index.js:212:65) at new File (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/file/index.js:135:24) at Pipeline.transform (/Users/helei/work/study/os-front/node_modules/babel-core/lib/transformation/pipeline.js:46:16) at transpile (/Users/helei/work/study/os-front/node_modules/babel-loader/lib/index.js:50:20) at Object.module.exports (/Users/helei/work/study/os-front/node_modules/babel-loader/lib/index.js:173:20)
06-02

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值