mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-25 09:37:14 +00:00
Re-translate the Japanese version (#1871)
* Retranslate Japanese docs with GPT-5.4 * Retranslate Japanese code with GPT-5.4
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// File: n_queens_test.go
|
||||
// Created Time: 2023-05-14
|
||||
// Author: Reanon (793584285@qq.com)
|
||||
|
||||
package chapter_backtracking
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNQueens(t *testing.T) {
|
||||
n := 4
|
||||
res := nQueens(n)
|
||||
|
||||
fmt.Println("入力された盤面の縦横は ", n)
|
||||
fmt.Println("クイーンの配置パターンは ", len(res), " 通り")
|
||||
for _, state := range res {
|
||||
fmt.Println("--------------------")
|
||||
for _, row := range state {
|
||||
fmt.Println(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user