RoAlgo Educational Round #2 | duplicare

This was the problem page during the contest. Access the current page here.
Time limit: 0.1s Memory limit: 4MB Input: Output:

Task

You are given an integer nn, with at most 44 digits. Implement the function duplicare, which gets as a parameter an integer nn and returns dd, the number obtained by writing each odd digit twice, or 1-1, if there was no such digit.

The proposed solution will only contain the definition of the required function. The occurence of other instructions can lead to errors which can lead to your solution obtaining a lower score.

Example

As an example, duplicare(10321032) = 110332110332, but duplicare(40844084) = 1-1.

Log in or sign up to be able to send submissions!