質問編集履歴
7
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
if num<=1:
|
36
36
|
|
37
|
-
return
|
37
|
+
return 1
|
38
38
|
|
39
39
|
return num*function(num-1)
|
40
40
|
|
6
0で処理が終わらないことの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,15 +28,13 @@
|
|
28
28
|
|
29
29
|
### 該当のソースコード
|
30
30
|
|
31
|
-
```python
|
31
|
+
```python
|
32
|
-
|
33
|
-
ソースコード
|
34
32
|
|
35
33
|
def function(num):
|
36
34
|
|
37
|
-
if num=
|
35
|
+
if num<=1:
|
38
36
|
|
39
|
-
return
|
37
|
+
return num
|
40
38
|
|
41
39
|
return num*function(num-1)
|
42
40
|
|
5
=不足
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
def function(num):
|
36
36
|
|
37
|
-
if num=1:
|
37
|
+
if num==1:
|
38
38
|
|
39
39
|
return 1
|
40
40
|
|
4
```の位置の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,7 +42,9 @@
|
|
42
42
|
|
43
43
|
num=int(input())
|
44
44
|
|
45
|
-
print(function(num))
|
45
|
+
print(function(num))
|
46
|
+
|
47
|
+
```
|
46
48
|
|
47
49
|
|
48
50
|
|
3
ソースコードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
def function(num):
|
36
36
|
|
37
|
-
if num
|
37
|
+
if num=1:
|
38
38
|
|
39
39
|
return 1
|
40
40
|
|
2
ソースコードを```で囲みました
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,13 +34,9 @@
|
|
34
34
|
|
35
35
|
def function(num):
|
36
36
|
|
37
|
-
if num<
|
37
|
+
if num<1:
|
38
38
|
|
39
|
-
print(num)
|
40
|
-
|
41
|
-
return
|
39
|
+
return 1
|
42
|
-
|
43
|
-
print(num)
|
44
40
|
|
45
41
|
return num*function(num-1)
|
46
42
|
|
1
ソースコードを```で囲みました
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
num=int(input())
|
48
48
|
|
49
|
-
print(function(num))
|
49
|
+
print(function(num))```
|
50
50
|
|
51
51
|
|
52
52
|
|