vault backup: 2023-11-24 14:22:03
This commit is contained in:
10
.obsidian/workspace.json
vendored
10
.obsidian/workspace.json
vendored
@ -13,7 +13,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Prog/Collections.md",
|
"file": "Algo/B2/Exercises/Repetitive tutorial.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Prog/Collections.md",
|
"file": "Algo/B2/Exercises/Repetitive tutorial.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -102,7 +102,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outgoing-link",
|
"type": "outgoing-link",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Prog/Collections.md",
|
"file": "Algo/B2/Exercises/Repetitive tutorial.md",
|
||||||
"linksCollapsed": false,
|
"linksCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Prog/Collections.md"
|
"file": "Algo/B2/Exercises/Repetitive tutorial.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -156,7 +156,7 @@
|
|||||||
"command-palette:Open command palette": false
|
"command-palette:Open command palette": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "41ec48cdc3af71a1",
|
"active": "c473a791e2b34194",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Prog/Collections.md",
|
"Prog/Collections.md",
|
||||||
"Algo/B2/Exercises/Repetitive tutorial.md",
|
"Algo/B2/Exercises/Repetitive tutorial.md",
|
||||||
|
@ -72,3 +72,35 @@ def power(x, n):
|
|||||||
n -= 1
|
n -= 1
|
||||||
return res
|
return res
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Exercise 1.4
|
||||||
|
|
||||||
|
```python
|
||||||
|
def fibo(n: int) -> int:
|
||||||
|
a = 0
|
||||||
|
b = 1
|
||||||
|
c = 0
|
||||||
|
i = 2
|
||||||
|
while i <= n:
|
||||||
|
c = a + b
|
||||||
|
a = b
|
||||||
|
b = c
|
||||||
|
i += 1
|
||||||
|
return b
|
||||||
|
```
|
||||||
|
|
||||||
|
## Exercise 1.5
|
||||||
|
```python
|
||||||
|
def my_sum(n: int) -> int:
|
||||||
|
s = 0
|
||||||
|
i = 1
|
||||||
|
while i <= n:
|
||||||
|
s += u(i)
|
||||||
|
i += 1
|
||||||
|
return s
|
||||||
|
def my_sum(n: int) -> int:
|
||||||
|
s = 0
|
||||||
|
while n > 0:
|
||||||
|
s += u(n)
|
||||||
|
n -= 1
|
||||||
|
return s
|
||||||
|
Reference in New Issue
Block a user