Dynamic Programming

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Your task is simple. Since this entire contest revolves around dynamic programming, this task will be to help you remember that dp stands for dynamic programming, and that it does not stand for anything else.

If the input is exactly dp, you must print dynamicprogramming.

If the input is exactly dynamicprogramming, you must print dp.

Note that the conversion is case-sensitive, and only occurs when all characters are lowercase.

If it is not either of the two, you must print the input.

Input Specification

The first line will contain a string. It is guaranteed that the length of the string will be at most 50 latin characters.

Output Specification

Print the desired output.

Sample Input 1

dynamicprogramming

Sample Output 1

dp

Sample Input 2

ninjaclasherdynamicprogramming

Sample Output 2

ninjaclasherdynamicprogramming

Sample Input 3

dpdpdp

Sample Output 3

dpdpdp

Sample Input 4

dP

Sample Output 4

dP

Comments

There are no comments at the moment.