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

31518번 - Triple Sevens 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 2048 MB106784276480.506%

문제

Eddy is overseeing construction of some new slot machines. His slot machines consist of three wheels, each of which can show one of several different digits. When activated, each wheel shows a random digit. The goal is for all wheels to be able to show the digit 7ドル$.

A slot machine is good if each wheel is capable of showing the digit 7ドル,ドル and bad otherwise. For a given slot machine, determine if it is good or bad.

입력

The first line contains a single integer $n$ $(1 \leq n \leq 10),ドル which is the number of different digits on each wheel. Each wheel has the same number of digits.

Each of the next three lines contains $n$ distinct digits (in the range from 0ドル$ to 9ドル$). These are the digits on each of the three wheels.

출력

Output a single integer, which is 777ドル$ if the slot machine is good, 0ドル$ otherwise.

제한

예제 입력 1

2
0 7
7 3
7 0

예제 출력 1

777

예제 입력 2

2
0 7
7 3
3 9

예제 출력 2

0

힌트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2023 ICPC Pacific Northwest Region > Division 1 M번

ICPC > Regionals > North America > Pacific Northwest Regional > 2023 ICPC Pacific Northwest Region > Division 2 F번

ICPC > Regionals > North America > Mid-Central Regional > 2023 Mid-Central USA Programming Contest G번

ICPC > Regionals > North America > South Central USA Regional > 2023 South Central USA Regional Contest > Division 2 H번

ICPC > Regionals > North America > Mid-Atlantic Regional > 2023 Mid-Atlantic USA Regional Contest > Division 2 H번

ICPC > Regionals > North America > Southeast USA Regional > 2023 Southeast USA Regional Programming Contest > Division 2 H번

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

출처

대학교 대회

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

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