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

25932번 - Find the Twins 다국어

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

문제

Dr. Orooji’s twins (Mack and Zack) play soccer. We will assume Mack wears jersey number 18 and Zack wears 17. So, Dr. O has to look for these two numbers when trying to find the twins.

Given a list of 10 numbers, determine if the twins are there.

입력

The first input line contains a positive integer, n, indicating the number of data sets to check. The sets are on the following n input lines, one set per line. Each set consists of exactly 10 single-space-separated distinct integers (each integer between 11 and 99 inclusive) giving the jersey numbers for the players.

출력

Print each input set. Then, on the next output line, print one of four messages (mack, zack, both, none), indicating how many of the twins are in the set. Leave a blank line after the output for each test case.

제한

예제 입력 1

4
11 99 88 17 19 20 12 13 33 44
11 12 13 14 15 16 66 88 19 20
20 18 55 66 77 88 17 33 44 11
12 23 34 45 56 67 78 89 91 18

예제 출력 1

11 99 88 17 19 20 12 13 33 44
zack
11 12 13 14 15 16 66 88 19 20
none
20 18 55 66 77 88 17 33 44 11
both
12 23 34 45 56 67 78 89 91 18
mack

힌트

출처

University > University of Central Florida > 2015 Local Programming Contest 1번

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

출처

대학교 대회

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

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