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

5087번 - Card Cutting 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB43732227773.087%

문제

Cheryl and Tania frequently play a simple card cutting game. They remove the picture cards then take it in turns to cut the pack. Every time an odd card turns up, Cheryl gets a point, every time an even card turns up, Tania scores one. When they get fed up, they add up the points.

입력

Input consists of data for a number of games. Each game consists of a list of card values on a single line, each value separated by a single space. 'A' represents an Ace which counts as a 1. The highest card value is 10. The last character on the line is a * to indicate the end of the game – do not process it as a card.

Input is terminated by a line containing just a # - that line should not be processed.

출력

Output consists of one line for each game giving the name of the winner, Cheryl or Tania, or the word Draw if both girls score the same number of points.

제한

예제 입력 1

A 2 8 3 10 A 3 A 5 *
2 4 9 3 6 3 7 8 *
#

예제 출력 1

Cheryl
Draw

힌트

Cheryl scores 6 points for A, 3, A, 3, A and 5, Tania scores 3 points for 2, 8 and 10.

Cheryl scores 4 points for 9, 3, 3 and 7, Tania also scores 4 points for 2, 4, 6 and 8.

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2011 B번

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

출처

대학교 대회

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

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