Date Formatting

View as PDF

Submit solution

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

Problem type

Given a date, S, represented in the format "mm/dd/yyyy" with or without leading zeroes, change it to the format "dd-mm-yyyy". Make sure to add leading zeroes where necessary.

Input Specification

The first and only line of input will be a valid date string in mm/dd/yyyy, S.

For 30/100 points, S will always contain leading zeroes.

Output Specification

Output the modified version of S in dd-mm-yyyy.

Sample Input 1

09/13/2019

Sample Output 1

13-09-2019

Sample Input 2

5/4/2002

Sample Output 2

04-05-2002

Comments

There are no comments at the moment.