1048: [编程入门]自定义函数之字符串拷贝 摘要:import java.io.*; /** * 直接用 String 类自带的 substring 方法,注意传进去的数是 m - 1。 */ public class Main …… 题解列表 2022年05月14日 0 点赞 0 评论 200 浏览 评分:0.0
字符串拷贝 摘要: #include #include #define Max 1000 char * Copy(char A[Max],char B[Max] ,i…… 题解列表 2022年05月08日 0 点赞 0 评论 276 浏览 评分:0.0
[编程入门]自定义函数之字符串拷贝 摘要:解题思路:注意事项:参考代码:暴力破解:#切片运算2#暴力m=input() res=[m[2:]] for i in res: print(i,end=" ")第二种优化方式:# 注意…… 题解列表 2022年04月07日 0 点赞 0 评论 582 浏览 评分:9.9
1048: 自定义函数之字符串拷贝(函数+指针即可) 摘要:解题思路:会指针的话会比较好理解。注意事项:参考代码:#include<stdio.h> void fz_kb(int n,char *p,int m) { p+=m-1;…… 题解列表 2022年03月23日 0 点赞 0 评论 428 浏览 评分:9.9
(简单易懂)自定义函数之字符串拷贝 摘要:注意事项:getchar()是读入函数的一种。它从标准输入里读取下一个字符,相当于getc(stdin)。返回类型为int型,为用户输入的ASCII码或EOF。getchar有一个int型的返回值。当…… 题解列表 2022年03月11日 0 点赞 0 评论 318 浏览 评分:0.0
编写题解 1048: [编程入门]自定义函数之字符串拷贝--解题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<iostream>#include<string.h>using namespace std;int main(){ …… 题解列表 2022年03月08日 0 点赞 0 评论 418 浏览 评分:0.0
1048: [编程入门]自定义函数之字符串拷贝 摘要:解题思路:题目提到“复制成为另一个字符串”,所以我就新建了字符串,用子函数返回这个新字符串。想偷懒的话甚至不用写子函数,直接在主函数用for循环打印就完事了。注意事项:(1)在新字符串的长度上出了一点…… 题解列表 2022年03月06日 0 点赞 0 评论 383 浏览 评分:9.9
简单易理解【C语言】 摘要: # 题目大意: ###### 输入n,输入一个长度为 n 的字符串,输入需要开始输出的位置 m ###### 输出该字符串从 m-1 下标开始到结束的子串 这个位置是下标加1后的结果 …… 题解列表 2022年02月10日 0 点赞 0 评论 265 浏览 评分:0.0
编写题解 1048: [编程入门]自定义函数之字符串拷贝 摘要:随便写的一个自认为简单的办法。#include<stdio.h>#include<string.h>int main(){ int n,m,i,j=0; scanf("%d\n",&n);…… 题解列表 2022年01月30日 0 点赞 0 评论 153 浏览 评分:0.0
不向自定义数组的大小 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ int n,m; int status=s…… 题解列表 2022年01月19日 0 点赞 0 评论 143 浏览 评分:0.0