質問編集履歴
3
コードをつけました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
```python
|
2
|
+
|
1
3
|
shiki = input("43+")
|
2
4
|
|
3
5
|
|
@@ -40,6 +42,8 @@
|
|
40
42
|
|
41
43
|
print(stack[0])
|
42
44
|
|
45
|
+
```
|
46
|
+
|
43
47
|
|
44
48
|
|
45
49
|
|
2
コピー&ペーストをしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
```python
|
2
|
-
|
3
1
|
shiki = input("43+")
|
4
2
|
|
5
3
|
|
@@ -14,27 +12,25 @@
|
|
14
12
|
|
15
13
|
while i < 3:
|
16
14
|
|
17
|
-
if shiki[i] == "+":
|
15
|
+
if shiki[i] == "+":
|
18
16
|
|
19
|
-
r2 = int(stack[0])
|
17
|
+
r2 = int(stack[0])
|
20
18
|
|
21
|
-
r1 = int(stack[1])
|
19
|
+
r1 = int(stack[1])
|
20
|
+
|
21
|
+
kotae = r1 + r2
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
kotae = r
|
25
|
+
kotae = str(kotae)
|
26
26
|
|
27
|
+
stack = stack[2:]
|
27
28
|
|
29
|
+
stack = kotae + stack
|
28
30
|
|
29
|
-
|
31
|
+
else:
|
30
32
|
|
31
|
-
stack = stack[2:]
|
32
|
-
|
33
|
-
stack = kotae + stack
|
34
|
-
|
35
|
-
else:
|
36
|
-
|
37
|
-
stack = shiki[i] + stack
|
33
|
+
stack = shiki[i] + stack
|
38
34
|
|
39
35
|
|
40
36
|
|
@@ -44,8 +40,6 @@
|
|
44
40
|
|
45
41
|
print(stack[0])
|
46
42
|
|
47
|
-
```
|
48
|
-
|
49
43
|
|
50
44
|
|
51
45
|
|
1
コードをつけました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
```python
|
2
|
+
|
1
3
|
shiki = input("43+")
|
2
4
|
|
3
5
|
|
@@ -42,6 +44,8 @@
|
|
42
44
|
|
43
45
|
print(stack[0])
|
44
46
|
|
47
|
+
```
|
48
|
+
|
45
49
|
|
46
50
|
|
47
51
|
|