The Prothom Alo newspaper sometimes publishes Sudoku for interested readers to solve. Later the solutions are also published. One day, Prothom Alo Editor Matiur Rahman thought, as everything is becoming digital, there should also be a digital version of Sudoku. Then readers will be able to submit the solution on the newspaper website. He assigned Munir Hasan for that job. Now Munir Hasan is a very busy person, he cannot possibly manage to do it himself. Besides, he have been away from programming for a long while. So he appointed a web developer for the task. Within a month the web developer implemented the system. But he was unable to write the program to check whether the Sudoku solution was correct. While being charged by Munir Hasan about that matter, he said, “Sir, I don’t know any logic”. Anyway, now your task is to rescue Munir Hasan from this situation.
A Sudoku consists of a board (with a total of cells). Initially some cells are filled with a number between and . The remaining empty cells are to be filled with numbers ranging from to . This should be done in such a way that, no row have the same number more than once and no column have the same number more than once. Each of the nine squares of size in that board can also have any number from to only once.
A Sudoku board where each cell is filled with a number between to .
Congratulations! If the Sudoku solution is correct. Otherwise print
987265341 987654321 123456789 214365879 896745231 132457689 214365879 112233449 887788776
Login to submit