HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50445 - Cryptography

Guest
• Review clarifications (1)

Volume problems

• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids
• 50304 - Number Pattern
• 50492 - Contest Scoreboard
• 50322 - Snake Pattern
• 50321 - Missing Number
• 50445 - Cryptography
• 50410 - Zero Padding
• 50380 - Sum of the Numbers in the ...
• 50400 - nth Row rth Element of a Table
• 50457 - The Number of Winners
• 50585 - Inner Product
• 50587 - Modular Conversion
• 030. 50737 - Sum of the k-largest n...
• 50419 - The longest bitonic sequence

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Erisa Terolli.

Crytography

Mr. Alban has a cryptographic company which uses a computerized system named Secret. Its main job is encrypting users passwords to protect them against different attacks. Each user must submit a 5 digit integer as a password. Secret uses the following encrypting schema:

  • The first is swapped with the fifth digit.
  • The second is swapped with the fourth digit.
  • The third digit is replaced with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10.

Question:
Write a program that outputs the Encrypted password entered by a user into Secret system.

Input specification
There is a 5 digit number.

Output specification
You will show the encrypted 5 digit number.

 Sample Input I   
  12345
 Sample Input II   
  70341
 Sample Output I   
  54021
 Sample Output II   
  14007


Для отправки решений необходимо выполнить вход.

www.contester.ru