回答編集履歴
2
微修正
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
len++;
|
14
14
|
|
15
|
-
|
15
|
+
return len;
|
16
16
|
|
17
17
|
}
|
18
18
|
|
1
修正
test
CHANGED
@@ -8,13 +8,11 @@
|
|
8
8
|
|
9
9
|
int len = 0;
|
10
10
|
|
11
|
-
while
|
11
|
+
while(*s++)
|
12
12
|
|
13
13
|
len++;
|
14
14
|
|
15
|
-
}
|
16
|
-
|
17
|
-
return len;
|
15
|
+
return len;
|
18
16
|
|
19
17
|
}
|
20
18
|
|
@@ -38,11 +36,11 @@
|
|
38
36
|
|
39
37
|
for ( int i = 0; i < k; i++ ) {
|
40
38
|
|
41
|
-
str
|
39
|
+
*(str+i) = *(t+k-i-1);
|
42
40
|
|
43
41
|
}
|
44
42
|
|
45
|
-
str
|
43
|
+
*(str+k) = '\0';
|
46
44
|
|
47
45
|
|
48
46
|
|