Simplify the declarations of the Python code.

This commit is contained in:
krahets
2023-05-22 22:03:57 +08:00
parent 081b76d620
commit e196962d0a
27 changed files with 88 additions and 87 deletions

View File

@ -415,7 +415,7 @@ $$
```python title=""
def algorithm(n: int) -> None:
a: int = 1 # +1
a = 1 # +1
a = a + 1 # +1
a = a * 2 # +1
# 循环 n 次
@ -604,8 +604,8 @@ $$
```python title=""
def algorithm(n: int) -> None:
a: int = 1 # +0技巧 1
a = a + n # +0技巧 1
a = 1 # +0技巧 1
a = a + n # +0技巧 1
# +n技巧 2
for i in range(5 * n + 1):
print(0)
@ -619,7 +619,7 @@ $$
```go title=""
func algorithm(n int) {
a := 1 // +0技巧 1
a := 1 // +0技巧 1
a = a + n // +0技巧 1
// +n技巧 2
for i := 0; i < 5 * n + 1; i++ {