RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00171

Astro

Silver II 실버 II
난이도
1s
시간 제한
32MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

Ivica and Marica are attending astronomy classes and are observing two unusual stars. They noted the time when each of them flashed. They further noticed that each of the stars flashes periodically, at regular intervals, and now they are wondering: on what day, at what hour will the stars flash at the same minute for the first time?

For example, if the first star flashed today (Saturday) at \(02{:}20\) and the second one at \(13{:}00\), with the first star flashing every \(05{:}50\) (every \(5\) hours and \(50\) minutes) and the second every \(01{:}00\) (each hour), then the first one will flash again at \(08{:}10\) and \(14{:}00\), and the second one at \(14{:}00\). Therefore, both stars will have flashed at the same minute today at \(14{:}00\).

Note that the time \(00{:}00\) (midnight) is the first minute of a day.

제약

In test cases worth 40% of total points, both flash intervals will be hou\(rs-on\)ly (MM will equal 00), for
example 13:00.

입력 형식

Four lines containing four timestamps in HH:MM format (hours:minutes), with \(00 \le HH \le 23\), \(00 \le MM \le 59\).

The timestamps are, respectively: the time of the first star's flash, the time of the second star's flash, the time between consecutive flashes of the first star, and the time between consecutive flashes of the second star.

The first two timestamps will differ, and both fall on the same day — Saturday. Flash intervals will not be \(00{:}00\).

출력 형식

If the stars will never flash at the same minute, output Never in a single line.

Otherwise, output in the first line (capitalised) the name of the weekday of the first same-minute flash. The weekday names are: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday and Saturday.

In the second line, output the timestamp of the first same-minute flash, in HH:MM format (with a leading zero if \(HH < 10\)).

Scoring: In test cases worth \(40\%\) of total points, both flash intervals will be hours-only (\(MM\) will equal \(00\)), for example \(13{:}00\).

서브태스크
서브태스크점수설명

Test 1

5점

None

Test 2

5점

None

Test 3

5점

None

Test 4

5점

None

Test 5

5점

None

Test 6

5점

None

Test 7

5점

None

Test 8

5점

None

Test 9

4점

None

Test 10

4점

None

Test 11

4점

None

Test 12

4점

None

Test 13

4점

None

Test 14

4점

None

Test 15

4점

None

Test 16

4점

None

Test 17

4점

None

Test 18

4점

None

Test 19

4점

None

Test 20

4점

None

Test 21

4점

None

Test 22

4점

None

Test 23

4점

None

예제 1
입력
02:20
13:00
05:50
01:00
출력
Saturday
14:00
예제 2
입력
02:20
23:28
00:40
23:50
출력
Never
예제 3
입력
23:19
10:19
02:42
09:11
출력
Thursday
00:31
문제 정보

riseoj 작성

출처 COCI 2010/2011 Contest 4

평가 및 의견

Astro

개요
출제자 난이도 Silver II 실버 II 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Astro

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8