回答編集履歴
5
短いコード例を追加
test
CHANGED
@@ -2,16 +2,10 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
|
7
5
|
# 標準入力から受け取る場合
|
8
6
|
|
9
7
|
|
10
8
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
9
|
```python
|
16
10
|
|
17
11
|
current, voltage, speed = [int(input().split("!")[0]) for _ in range(3)]
|
@@ -90,10 +84,16 @@
|
|
90
84
|
|
91
85
|
|
92
86
|
|
93
|
-
# current, voltage, speed = map(input, range(3))
|
94
|
-
|
95
87
|
current, voltage, speed = [input() for _ in range(3)]]
|
96
88
|
|
89
|
+
|
90
|
+
|
91
|
+
# 2.x) current, voltage, speed = map(input, range(3))
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
# 3.x) current, voltage, speed = [eval(input()) for _ in range(3)]]
|
96
|
+
|
97
97
|
```
|
98
98
|
|
99
99
|
|
4
func(10, 15) -> func(10, 25, 15)
test
CHANGED
@@ -204,8 +204,8 @@
|
|
204
204
|
|
205
205
|
|
206
206
|
|
207
|
-
>>> func(10, 15)
|
207
|
+
>>> func(10, 25, 15)
|
208
|
-
|
208
|
+
|
209
|
-
35
|
209
|
+
35
|
210
|
-
|
210
|
+
|
211
|
-
```
|
211
|
+
```
|
3
コメントの区切り文字が間違っていた部分を修正
test
CHANGED
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
current, voltage, speed = [
|
44
44
|
|
45
|
-
int(line.split("
|
45
|
+
int(line.split("!")[0]) for line in fileinput.input()
|
46
46
|
|
47
47
|
]
|
48
48
|
|
2
python2.7のときのコード例を追加
test
CHANGED
@@ -90,7 +90,9 @@
|
|
90
90
|
|
91
91
|
|
92
92
|
|
93
|
+
# current, voltage, speed = map(input, range(3))
|
94
|
+
|
93
|
-
current, voltage, speed = [input() for _ in range(3)]
|
95
|
+
current, voltage, speed = [input() for _ in range(3)]]
|
94
96
|
|
95
97
|
```
|
96
98
|
|
1
対話入力のオプション間違えていたのを訂正 -c -> -i
test
CHANGED
@@ -198,7 +198,7 @@
|
|
198
198
|
|
199
199
|
# 対話入力を使ってテスト
|
200
200
|
|
201
|
-
$ python -
|
201
|
+
$ python -i program.py
|
202
202
|
|
203
203
|
|
204
204
|
|