Simplified Sudoku

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 62M

Author:
Problem type

Sudoku is a game where 9 squares are placed together to form a 3x3 square. Each square contains a 3x3 grid with a number between 1 and 9 in each space. The objective is to fill in missing spaces with numbers such that each square, row and column contains only 1 occurrence of the numbers 1-9. A completed Sudoku squares looks like the following:

If you can't see the image just search it up.

Your task is to take a single 3x3 square from one of the 9 larger Sudoku squares. This square will have 8 values. You must find the missing one.

Input Specification

The first and only line of input will contain all the numbers present in the Sudoku square. There will be 8 space separated integers.

Output Specification

Output the value of the missing number.

Sample Input

1 8 5 2 3 9 4 7

Sample Output

6

Comments

There are no comments at the moment.