FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python_practice/combinationspython.py at master · danglingmind/python_practice · GitHub
danglingmind
python_practice
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python_practice
/
combinationspython.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (15 loc) · 339 Bytes
Breadcrumbs
python_practice
/
combinationspython.py
Copy path
File metadata and controls
20 lines (15 loc) · 339 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def
f
(
N
:
int
,
c
:
list
):
# solusion matrix
s
=
[]
for
index
in
range
(
len
(
c
)):
if
index
==
0
:
s
.
append
([
list
(
c
)])
else
:
cost1
=
min
(
s
[
1
],
s
[
2
])
cost2
=
min
(
s
[
0
],)
N
=
int
(
input
())
c
=
[]
for
i
in
range
(
N
):
c
.
append
(
map
(
int
,
input
().
split
(
' '
)))
out_
=
f
(
N
,
c
)
print
(
out_
)
Back
|
FazBrowse Home
|
New Git URL