Logo
(追記) (追記ここまで)

26576번 - Date 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB2311167349.324%

문제

You are starting to get annoyed with how your phone shows you the date, so you want to put it into a different format. Currently, your phone gives you the date in the format Month Day, Year (ex. July 25, 2018). Your goal is to shorten the format exactly like this, MM/DD/YY, where M is month, D is day, and Y is year (ex. 07/25/18). Write a program that will calculate this format change.

입력

The first line will contain a single integer n that indicates the number of lines that follow. The next n lines will be in the format Month Day, Year. The full year integer will be between 1 and 300,000,000.

출력

Your output should be the same date as the input, but in the new format MM/DD/YY. If the month, day or year is only one digit, pad with a 0. If the date is not valid (the month is spelled incorrectly, the day is less than 1 or greater than 31), print Invalid. You do not need to check that the day fits within the month's days, just that it is not greater than 31. The year format will be the last two digits (or 1 digit padded with a 0) of the input year.

제한

예제 입력 1

3
February 5, 990
December 25, 12018
Decembuary 31, 2000

예제 출력 1

02/05/90
12/25/18
Invalid

힌트

출처

School > PLU High School Programming Contest > PLU 2020 > Novice 4번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /