回答編集履歴
3
修正
test
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
+
修正
|
2
|
+
|
1
3
|
```Python
|
2
4
|
|
3
|
-
def col3(
|
5
|
+
def col3(s):
|
4
6
|
|
5
|
-
|
7
|
+
s=str(s)
|
6
8
|
|
7
|
-
|
9
|
+
if len(s)>3:
|
8
10
|
|
11
|
+
return col3(s[:-3])+','+s[-3:]
|
12
|
+
|
9
|
-
return s
|
13
|
+
return s
|
10
14
|
|
11
15
|
```
|
12
|
-
|
13
|
-
とか
|
2
修整
test
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
```Python
|
2
2
|
|
3
|
-
def col3(
|
3
|
+
def col3(d):
|
4
4
|
|
5
|
-
if
|
5
|
+
if d>=1000:
|
6
6
|
|
7
|
-
return col3(
|
7
|
+
return col3(d//1000)+','+str(d%1000)
|
8
8
|
|
9
|
-
return s
|
9
|
+
return str(d)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
print(col3("1234567"))
|
14
10
|
|
15
11
|
```
|
16
12
|
|
1
修整
test
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
```Python
|
2
2
|
|
3
|
-
def col3(
|
3
|
+
def col3(s):
|
4
|
-
|
5
|
-
s=str(d)
|
6
4
|
|
7
5
|
if len(s)>3:
|
8
6
|
|
@@ -10,6 +8,10 @@
|
|
10
8
|
|
11
9
|
return s
|
12
10
|
|
11
|
+
|
12
|
+
|
13
|
+
print(col3("1234567"))
|
14
|
+
|
13
15
|
```
|
14
16
|
|
15
17
|
とか
|