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

34441번 - Ski Traffic 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB85676578.313%

문제

Students at the Colorado School Of Mines love to go skiing, but hate waiting in traffic. A student, Sam, has come up with a precise algorithm via machine learning to determine how long it will take to travel to a ski hill:

  1. The expected time is doubled if it's a weekend (i.e. a Saturday or a Sunday).
  2. The expected time is doubled if there's bad weather on I-70.
  3. The expected time is tripled if it recently snowed on the Front Range.
  4. The expected time is tripled if it's a holiday.

Note that many of these rules may apply to a single day. Sam would like to use her algorithm to predict how long it will take to travel to the hill. It is up to you to implement Sam's algorithm!

입력

The input consists of six lines; the following list gives the content of each of the lines.

  1. The name of the hill (for example, "Lockstone", "Skistone", "Navajo Basin", etc.)
  2. The time needed to get to the ski area assuming perfect conditions; the line is of the format "$h$:$m$" where the integer $h$ is the number of hours (0ドル \leq h \leq 10,000円$) and the integer $m$ is the number of minutes (0ドル \leq m < 60$). $m$ is always given as two digits (i.e. zero-padded on the left) but $h$ may not be.
  3. The day of the week, which is one of strings "mon", "tue", "wed", "thr", "fri", "sat", or "sun"
  4. A "1" if the weather's bad on I-70 and a "0" otherwise
  5. A "1" if it recently snowed on the Front Range and a "0" otherwise
  6. A "1" if it's a holiday and a "0" otherwise

출력

Output the expected time in the format "$h$:$m$" where $h$ is the integer number of hours and $m$ is the integer number of minutes. $m$ must be two digits (i.e. zero-padded on the left). The output should not have more than 59ドル$ minutes. For instance, "1:61" is invalid and should be "2:01" instead.

제한

예제 입력 1

Keystone
1:00
sat
1
1
0

예제 출력 1

12:00

예제 입력 2

Arapahoe Basin
0:45
mon
0
0
1

예제 출력 2

2:15

노트

출처

School > CS@Mines > CS@Mines HSPC 2019 F번

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

출처

대학교 대회

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

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