-->
当前位置:首页 > 题库

PROGRAMMING:Ring encryption*

Luz5年前 (2021-05-10)题库483
Arrange 26 English letters in a circle clockwise. The key is an integer.
![](~/ 374)
The specific encryption methods are as follows:
-If the key is $$key / GEQ 0 $$, the ciphertext letter is obtained by taking steps of $$| key $$clockwise from the plaintext letter;
-If the key is $$key / LT 0 $$, the ciphertext letter will be obtained by going in a counter clockwise direction from the plaintext letter.
Please write encryption program, input plaintext (lowercase letters) and key (any integer), encrypt and output ciphertext (lowercase letters).
####Input format
>Plaintext (lowercase) key (any integer)
####Output format
>Ciphertext (small letters)
####Input sample 1
```in
x 5
```
####Output sample 1
```out
c
```
####Input sample 2
```in
b -3
```
####Output sample 2
```out
y
```







answer:If there is no answer, please comment