赛派号

bubaoryry是什么牌子 code golf

One aspect of password strength testing is runs of adjacent letters on the keyboard. In this challenge, a program must be created that returns true if a string contains any runs of adjacent letters.

What counts as a run of adjacent letters?

For this simplified version of a password strength tester, a run of adjacent characters is 3 or more letters which are next to each other in a single direction (left, right, above or below) on a QWERTY keyboard. For the purpose of this challenge the layout of the keyboard looks like this:

1234567890 QWERTYUIOP ASDFGHJKL ZXCVBNM

In the diagram above Q is below 1 but not below 2, so a string that contains 1qa or aq1 anywhere inside it would make the program return true, but 2qa would not.

Input

The password string to check. It will only contain the characters [0-9a-z] or [0-9A-Z] (your choice).

Output

The program must return a truthy value if the password contains one or more runs of adjacent keys, or falsey if it contains none.

Examples

The following inputs should output true:

asd ytrewq ju7 abc6yhdef

And these inputs should output false:

abc aaa qewretry zse qwdfbn pas Rules Answers may be complete programs or functions. Standard loopholes are disallowed. This is code-golf, lowest score (in bytes) wins!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了