2104 - IP_2020_YOU_HW3 Scoreboard

Time

2020/09/29 12:00:00 2020/10/06 12:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12889 Caesar Cipher
12890 Prime Numbers

12889 - Caesar Cipher   

Description

In cryptography, a Caesar cipher, also known the shift cipher or Caesar shift, is one of the simplest encryption techniques.

In Caesar cipher each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on.

 

 

(Excerpted from wiki: https://en.wikipedia.org/wiki/Caesar_cipher)

Given one integer S to represent the left shift amount, and a string CT to represent the ciphered-text. Please Write a C Program to print out the origin plaintext.

Input

One integer S (left shift amount) and a string CT (ciphered-text).

Note that:

  1. -32,768 <= S <= 32,767.
  2. CT contains only lowercase English letters.
  3. The length of CT <= 2000.

Output

Output should follow below format:

PT

Note that:

  1. Need to have a return value('\n') at the end of your string.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12890 - Prime Numbers   

Description

Given one integers N. Please Write a C program to print out all the prime numbers between 2 and N (Included 2 and N, if N is a prime number).

Hint: You may need an array to store prime numbers that you found.

Input

One integer N.

Note that:

  1. 32,767 >= N >= 2.

Output

Output should follow below format:

P1 P2 P3 P4 … Pn

Note that:

  1. Need to have a return value('\n') at the end of your string.
  2. P1 ~ Pn are all prime numbers between 2 and N.
  3. P1 ~ Pn should be arranged in ascending power. That means, Pn > … > P4 > P3 > P2 > P1.

Sample Input  Download

Sample Output  Download

Tags




Discuss