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

14039번 - Magic Squares 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB47633831571.429%

문제

Magic Squares are square arrays of numbers that have the interesting property that the numbers in each column, and in each row, all add up to the same total.

Given a 4 × 4 square of numbers, determine if it is magic square.

입력

The input consists of four lines, each line having 4 space-separated integers.

출력

Output either magic if the input is a magic square, or not magic if the input is not a magic square.

제한

예제 입력 1

16 3 2 13
5 10 11 8
9 6 7 12
4 15 14 1

예제 출력 1

magic

예제 입력 2

5 10 1 3
10 4 2 3
1 2 8 5
3 3 5 0

예제 출력 2

not magic

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2016 > CCC 2016 Junior Division 2번

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

출처

대학교 대회

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

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