自定义函数之字符串拷贝 简单易懂 摘要:解题思路:切片注意事项:参考代码:m=int(input())x=input()n=int(input())d=x[n-1:]print(d)…… 题解列表 2022年11月11日 0 点赞 0 评论 206 浏览 评分:9.9
指针法巧解自定义函数之字符串拷贝 摘要:解题思路:1.先定义正常的n,m的值;2.定义一个变量i;3.定义一个指针指向a数组的首地址加上m - 1,也就是意味着p指针指向了a[m - 1];4.输出由指针p指向的字符串即可。注意事项:1.一…… 题解列表 2022年11月13日 0 点赞 0 评论 132 浏览 评分:9.9
自定义函数之字符串拷贝 摘要:解题思路:用切片很简单注意事项:参考代码:n = int(input())L = str(input())m = int(input())print(L[m-1:n])…… 题解列表 2023年01月04日 0 点赞 0 评论 169 浏览 评分:9.9
[编程入门]自定义函数之字符串拷贝(水题) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,m,i; char s[100]; scanf("%d",&n); for(i=0;i<=n;i+…… 题解列表 2023年01月08日 0 点赞 0 评论 127 浏览 评分:9.9
LikeWater - 1048: [编程入门]自定义函数之字符串拷贝C++(两种解法,简单到再看一眼就会爆炸!) 摘要:##这是一个基本题目,还是与string字符串已经字符数组有关,解析如下↓⭐ *1、方法一,直接用string和它的处理函数substr* **str.substr(n,m);//截取str字…… 题解列表 2023年03月12日 0 点赞 1 评论 107 浏览 评分:9.9
1048: [编程入门]自定义函数之字符串拷贝 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char str[100]; int n,m; scanf("%d",&n); scanf("%s",str);…… 题解列表 2023年03月28日 0 点赞 0 评论 153 浏览 评分:9.9
c++字符串简单解法 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm>using namespace std;int main(){ int n,m; string…… 题解列表 2023年10月15日 0 点赞 0 评论 121 浏览 评分:9.9
代码的尽头是优雅 摘要:解题思路: 遍历字符串注意事项:代码索引和现实数字位置序号不一样参考代码:import java.util.Scanner;public class Main { static Scanner …… 题解列表 2023年11月16日 0 点赞 0 评论 126 浏览 评分:9.9
strcpy?不不不,都多余了 摘要:```c #include int main() { int a,b; char s[10000]; scanf("%d%s%d",&a,s,&b); c…… 题解列表 2023年12月20日 0 点赞 0 评论 130 浏览 评分:9.9
java--study||O.o 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) …… 题解列表 2024年02月13日 0 点赞 0 评论 254 浏览 评分:9.9