-->
当前位置:首页 > 题库

PROGRAMMING:Date formatting

Luz5年前 (2021-05-10)题库492
###Task description
Different countries in the world have different habits of writing dates. For example, Americans are used to writing "month day year", while Chinese are used to writing "Year Month Day".
When Yu Long wrote some dates, he mistakenly put the year in the wrong position. It may be in the front, in the middle, or at the end.
Next, please write a program to automatically rewrite the date of Yulong into the date of Chinese custom.
###Input format:
Enter the year, month, and day in one line in the format of "MM DD yyyy" or "mm yyyy DD" or "yyyy MM DD". The date given by the title guarantee is the legal date since new year's day of 1900, the guarantee month is before and after, and the guarantee year is 4 digits.
###Output format:
Output the correct date format used by Chinese people in one line. The month and date should be output with 2 digits, and 0 should be filled before less than 2 digits.
###Input example:
```in
5-1-2019
```
###Output example:
```out
2019-05-01
```
###Input example:
```in
11-2019-05
```
###Output example:
```out
2019-11-05
```







answer:If there is no answer, please comment