Bebras青少年阶段样题示例(15-16岁)

密码机

(年龄组:少年组; 难度:中等; 类别:信息)

In the school’s computer lab the beavers have to set new passwords for their accounts. They are allowed to use lower-case letters, capital letters and the digits from 0 to 9. Each password must have a typical order to be accepted.

在学校电脑实验室里,海狸们得为自己的账户设置新密码。他们可以使用小写字母、大写字母以及 0 到 9 的数字。每个密码都必须有常规的排列顺序才能被接受。

  • A-Z means any capital letter from the alphabet.A-Z 表示字母表中的任何大写字母。
  • 0-9 means any digit. 0 到 9 表示任何数字。
  • a-z means any lower-case letter from the alphabet.a-z 表示字母表中的任何小写字母。

There are certain rules for the password to be accepted.

密码要被接受,必须符合一定的规则。

Bebras青少年阶段样题示例(15-16岁)

In a loop any quantity of letters or digits can be used several times. In this loop the beavers are allowed to use zero, one or more capital letters.

在一个循环中,任意数量的字母或数字可以被多次使用。在这个循环中,海狸被允许使用零个、一个或多个大写字母。

An edge means that the beavers have to use exactly one letter or digit. This edge demands one lower-case letter.

一条边意味着海狸必须使用恰好一个字母或数字。这条边要求使用一个小写字母。

Which of the following passwords won’t be accepted?

以下哪个密码不会被接受?

A) 123aNNa

B) Peter3ABCd

C) 2010Beaver4EVEr

D) bENNOZzz

答案解析:

D) “bENNOZzz” is the password that won’t be accepted. It ends with a capital-case letter followed by two lower-case letters, which isn’t allowed.

D)“bENNOZzz”这个密码不会被接受。它以一个大写字母结尾,后面跟着两个小写字母,这是不允许的。

A) “123aNNa” , B) “Peter33ABCd” and C) “2010Beaver4EVEr” are legitimate.

A)“123aNNa”、B)“Peter33ABCd”和 C)“2010Beaver4EVEr”都是合法的。

说明:

The graphic of an abstract machine, a theoretical model of a computer hardware or software system, is a good way to visualize and understand how computers, programs, etc. deal with input. It also shows the visualization of rules.

抽象机的图形,即计算机硬件或软件系统的理论模型,是直观了解计算机、程序等如何处理输入的好方法。它还展示了规则的可视化。

Bebras新赛季备赛已开启,扫码领取Bebras真题资料⇓

欢迎咨询【Bebras辅导课程】

在线客服
微信咨询