문제
Mirko has found an old chessboard and a set of pieces in his attic. Unfortunately, the set contains only white pieces, and apparently an incorrect number of them. A set of pieces should contain:
-
One king
-
One queen
-
Two rooks
-
Two bishops
-
Two knights
-
Eight pawns
Mirko would like to know how many pieces of each type he should add or remove to make a valid set.
입력
The input consists of 6 integers on a single line, each between 0 and 10 (inclusive). The numbers are, in order, the numbers of kings, queens, rooks, bishops, knights and pawns in the set Mirko found.
출력
Output should consist of 6 integers on a single line; the number of pieces of each type Mirko should add or remove. If a number is positive, Mirko needs to add that many pieces. If a number is negative, Mirko needs to remove pieces.
예제 입력 1
0 1 2 2 2 7
예제 출력 1
1 0 0 0 0 1
예제 입력 2
2 1 2 1 2 1
예제 출력 2
-1 0 0 1 0 7
코드를 제출하려면 로그인이 필요합니다.
로그인| # | 순위 | 사용자 | 언어 | 시간 | 메모리 | 코드 길이 | |
|---|---|---|---|---|---|---|---|
| 6040 | 🥇 | 조선우 | Python | 7ms | 8284KB | 92B | |
| 6155 | 🥈 | 이채환 | Python | 7ms | 8324KB | 102B | |
| 6542 | 🥉 | 천재영 | Python | 7ms | 8364KB | 104B | |
| 8410 | 4 | 이혁준 | Python | 7ms | 8460KB | 101B | |
| 8349 | 5 | Undefined | Python | 8ms | 8380KB | 215B | |
| 8553 | 6 | 고수아 | Python | 8ms | 8396KB | 127B |
| # | 사용자 | 문제 | 결과 | 언어 | 시간 | 메모리 | 코드 길이 | 제출 시간 | |
|---|---|---|---|---|---|---|---|---|---|
| 8553 | 맞았습니다 | Python | 8ms | 8396KB | 127B | 2026. 05. 29. 07:39 | |||
| 8552 | 런타임 에러 | Python | - | - | 128B | 2026. 05. 29. 07:38 | |||
| 8410 | 맞았습니다 | Python | 7ms | 8460KB | 101B | 2026. 05. 26. 07:04 | |||
| 8409 | 틀렸습니다 | Python | - | - | 400B | 2026. 05. 26. 07:01 | |||
| 8407 | 틀렸습니다 | Python | - | - | 360B | 2026. 05. 26. 06:53 | |||
| 8405 | 틀렸습니다 | Python | - | - | 336B | 2026. 05. 26. 06:51 | |||
| 8404 | 틀렸습니다 | Python | - | - | 336B | 2026. 05. 26. 06:51 | |||
| 8349 | 맞았습니다 | Python | 8ms | 8380KB | 215B | 2026. 05. 26. 02:11 | |||
| 6542 | 맞았습니다 | Python | 7ms | 8364KB | 104B | 2026. 05. 20. 17:07 | |||
| 6155 | 맞았습니다 | Python | 7ms | 8324KB | 102B | 2026. 05. 12. 07:34 | |||
| 6154 | 런타임 에러 | Python | - | - | 85B | 2026. 05. 12. 07:34 | |||
| 6040 | 맞았습니다 | Python | 7ms | 8284KB | 92B | 2026. 05. 07. 07:46 |