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

31655번 - International Dates 다국어

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

문제

You read a lot of documents that come from the United States, Europe, and other countries around the world. The issue is that their date formats aren’t consistent! The US formats their dates as MM/DD/YYYY while in Europe they format it as DD/MM/YYYY. That is, in the US the month comes before the day, while in Europe the day comes first. Given a date, can you determine if its definitely the US format, for sure European, or could be either? (Note that there are even more date formats, but luckily since the year is guaranteed to be last in this case, we only have to worry about these 2 formats.)

입력

The input consists of a single string comprised of 3 integers separated by forward slashes, as $AA/BB/CCCC,ドル where 1ドル \le AA, BB, \le 31,ドル and 0ドル \le CCCC \le 9999$. It is guaranteed that the given string will be a valid date for at least one of the formats. You can assume that all 12ドル$ months have exactly 31ドル$ days, so there is no need to worry about months with 30 days, or February.

출력

Output either US if the date doesn’t conform to the European format, or EU if the date doesn’t conform to the US format. Otherwise, output either if there is no way to know for sure which format the date follows.

제한

예제 입력 1

25/03/2023

예제 출력 1

EU

예제 입력 2

04/02/2023

예제 출력 2

either

예제 입력 3

07/23/1972

예제 출력 3

US

힌트

출처

University > University of Alberta Programming Contest > UAPC 2023 > Division 2 J번

  • 문제를 만든 사람: Noah Gergel
(追記) (追記ここまで)

출처

대학교 대회

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

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