본문 바로가기

BOJ

[BOJ][Text] 백준 20095번 - Sudoku 2

728x90

문제 링크: https://www.acmicpc.net/problem/20095

 

20095번: Sudoku 2

Fereydun, the legendary Persian hero whose prophecy was to overcome Zahhak, believes that he needs a powerful mind together with a powerful body. He has just learned a new brain teaser, called Sudoku, from a Japanese trader.  Sudoku is played on a board t

www.acmicpc.net

 

 


문제 풀이

이번에는 3*3 스도쿠이다. 이 역시 자필로 풀었으며, 코딩으로 답을 찾으려면 백트래킹으로 풀 수 있고, 백준에도 그러한 문제들이 존재한다. 입력은 아래와 같은 스도쿠로 들어온다. 빈칸은 0으로 들어오고 이 0에 정답을 넣으면 된다.

 

 

코드

728x90