From 5efceceb4c2b524f42deb0108913f88ef7f89742 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Thu, 6 Jun 2019 18:43:10 +0100 Subject: [PATCH] update and translation of raid2 --- subjects/raid2.en.md | 14 +++++++++++++- subjects/raid2.fr.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 subjects/raid2.fr.md diff --git a/subjects/raid2.en.md b/subjects/raid2.en.md index 08d261411..cf23e7194 100644 --- a/subjects/raid2.en.md +++ b/subjects/raid2.en.md @@ -6,7 +6,11 @@ - A valid sudoku has only one possible solution. -Examples of outputs : +### Usage + +#### Example 1: + +Example of output for one valid sudoku : ```console student@ubuntu:~/student/raid2$ go build @@ -20,6 +24,14 @@ student@ubuntu:~/student/raid2$ ./raid2 ".96.4...1" "1...6...4" "5.481.39." "..7 7 1 2 6 3 8 4 5 9$ 6 5 9 1 7 4 8 3 2$ 8 4 3 5 9 2 1 6 7$ +student@ubuntu:~/student/raid2$ +``` + +#### Example 2: + +Examples of output for invalid input or sudokus : + +```console student@ubuntu:~/student/raid2$ ./raid2 1 2 3 4 +" | cat -e Error$ student@ubuntu:~/student/raid2$ ./raid2 | cat -e diff --git a/subjects/raid2.fr.md b/subjects/raid2.fr.md new file mode 100644 index 000000000..3dd98263c --- /dev/null +++ b/subjects/raid2.fr.md @@ -0,0 +1,42 @@ +## raid2 + +### Instructions + +- Créer un programme qui résout un sudoku. + +- Un sudoku valide a seulement une solution possible. + +### Usage + +#### Example 1: + +Exemple d'output pour un sudoku valide : + +```console +student@ubuntu:~/student/raid2$ go build +student@ubuntu:~/student/raid2$ ./raid2 ".96.4...1" "1...6...4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e +3 9 6 2 4 5 7 8 1$ +1 7 8 3 6 9 5 2 4$ +5 2 4 8 1 7 3 9 6$ +2 8 7 9 5 1 6 4 3$ +9 3 1 4 8 6 2 7 5$ +4 6 5 7 2 3 9 1 8$ +7 1 2 6 3 8 4 5 9$ +6 5 9 1 7 4 8 3 2$ +8 4 3 5 9 2 1 6 7$ +student@ubuntu:~/student/raid2$ +``` + +#### Example 2: + +Examples d'outputs pour des inputs ou un sudoku invalides : + +```console +student@ubuntu:~/student/raid2$ ./raid2 1 2 3 4 +" | cat -e +Error$ +student@ubuntu:~/student/raid2$ ./raid2 | cat -e +Error$ +student@ubuntu:~/student/raid2$ ./raid2 ".96.4...1" "1...6.1.4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e" +Error$ +student@ubuntu:~/student/raid2$ +```