解 2861: 验证子串 摘要:解题思路:注意事项:参考代码:a = input().strip()b = input().strip()if a.find(b) != -1: print(f"{b} is substring…… 题解列表 2024年08月01日 0 点赞 0 评论 420 浏览 评分:0.0
验证子串(二种方法) 摘要:解题思路:注意事项:参考代码:第一种强行解题,硬解:#include<stdio.h> #include<string.h> int main() { char a[200]; char…… 题解列表 2023年10月21日 0 点赞 0 评论 321 浏览 评分:0.0
2861-验证子串 摘要:解题思路:实际上本题用到了数据结构的思想,采用最传统的暴力法,不断的比较注意事项:参考代码:int main(){ char s1[201]; char s2[201]; int len1…… 题解列表 2023年06月20日 0 点赞 1 评论 248 浏览 评分:0.0
2861: 验证子串 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>#define maxn 205char cmp(char…… 题解列表 2024年11月09日 0 点赞 0 评论 241 浏览 评分:0.0
c代码记录之验证字串 摘要:1.空串是所有字符串的子串,但这题好像不验证这个 2.gets不通过,scanf能通过 #include #include int main() { …… 题解列表 2023年11月30日 0 点赞 1 评论 237 浏览 评分:2.0
2861: 验证子串 输入用cin可以,用getline不行,不知道为什么 摘要:解题思路:注意事项:参考代码:#include <iostream> // #include <sstream> // #include <cstdio> // #include <algori…… 题解列表 2023年02月22日 0 点赞 0 评论 265 浏览 评分:5.2
长短比较确定正反。 摘要:解题思路:设定三个字符串,strm,strn,stra。其中stra是对长的字符串(strm或者strn)进行部分截取,再与短的字符串进行strcmp函数的比较。注意事项:参考代码:#include<…… 题解列表 2023年11月03日 0 点赞 0 评论 350 浏览 评分:8.0
2861: 验证子串(python) 摘要:解题思路:注意事项:参考代码:a = input().strip() # 注意把前导空格去掉 b = input().strip() if a in b: print("%s is s…… 题解列表 2023年02月24日 0 点赞 0 评论 317 浏览 评分:9.9
验证字串C解 摘要:解题思路:注意事项:用gets只能过一部分,scanf能全过,也不知道为啥参考代码:#include<stdio.h>#include<string.h>int main(){ char s1[…… 题解列表 2024年02月16日 0 点赞 0 评论 329 浏览 评分:9.9
java--study||O.o 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) …… 题解列表 2024年02月03日 0 点赞 0 评论 153 浏览 评分:9.9