Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Projets Sudoku ARP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cours L3 Info
Projets Sudoku ARP
Commits
92d2dbbe
Commit
92d2dbbe
authored
7 months ago
by
(Fanny DE WEERDT)
Browse files
Options
Downloads
Patches
Plain Diff
correction de l'affichage du temps
parent
22f774b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sudoku.py
+8
-7
8 additions, 7 deletions
sudoku.py
with
8 additions
and
7 deletions
sudoku.py
+
8
−
7
View file @
92d2dbbe
...
...
@@ -2,6 +2,7 @@
---------------------------------------------------------------------------------------------
ARP - L3 - 2024
Projets : Sudoku
Auteur : Lucas Battaglia et Fanny de Weerdt
Ce programme devrait résoudre le problème de la résolution d
'
un sudoku.
---------------------------------------------------------------------------------------------
"""
...
...
@@ -28,7 +29,7 @@ class State:
self
.
N_ROWS
=
len
(
self
.
grid
)
self
.
N_COLS
=
len
(
self
.
grid
[
0
])
self
.
last_move
=
move
if
self
.
N_COLS
!=
self
.
N_
COL
S
:
if
self
.
N_COLS
!=
self
.
N_
ROW
S
:
assert
False
,
"
ERROR: invalid grid format (Number of columns different from number of rows).
"
self
.
score
=
self
.
get_nb_case_vide
()
self
.
scoreMax
=
max
...
...
@@ -741,11 +742,11 @@ if solution_node:
else:
print(knights_problem.initial_state())
"""
def
convertir_
m
s
(
m
s
):
minut
o
s
=
m
s
//
60
# division entière pour obtenir les minutes
se
gu
nd
o
s
=
(
m
s
%
60
)
# division pour obtenir les secondes restantes
return
minut
o
s
,
se
gu
nd
o
s
def
convertir_s
(
s
):
minut
e
s
=
s
//
60
# division entière pour obtenir les minutes
se
co
nd
e
s
=
(
s
%
60
)
# division pour obtenir les secondes restantes
return
minut
e
s
,
se
co
nd
e
s
temps
=
end
-
start
print
(
temps
)
print
(
temps
//
60
,
temps
%
60
//
1
,
temps
%
60
%
1
)
\ No newline at end of file
minutes
,
secondes
=
convertir_s
(
temps
)
# Convertir en ms
print
(
f
"
Temps de recherche :
{
minutes
}
minutes et
{
secondes
}
secondes
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment