蓝桥杯算法训练VIP-比较字符串-python 摘要:解题思路:注意题目所给信息,任一字符串都不是彼此的前缀,意思是如果能够遍历完字符串那么必定相等,如果不能,必定存在某个不相同的字符串,不可能出现遍历完其中一个字符串,但仍然找不到不同字符的情况,即短的…… 题解列表 2023年01月10日 0 点赞 0 评论 106 浏览 评分:0.0
python 比较字符串 带解析 摘要:S=input().split() #输入字符 分割s1=S[0]s2=S[1]if s1==s2: print(0)elif s1>s2: for i in range(min(len(…… 题解列表 2023年03月01日 0 点赞 0 评论 88 浏览 评分:0.0
比较字符串——python 摘要:解题思路:注意事项:参考代码:a,b = map(str,input().split())c = min(len(a),len(b))if a == b: print(0)else: fo…… 题解列表 2023年03月30日 0 点赞 0 评论 78 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str1[101], str2[101]; scanf…… 题解列表 2023年07月03日 0 点赞 0 评论 96 浏览 评分:0.0
比较字符串(嘿嘿,这题嘛,其实可以输出strcmp的返回值的,返回值就是字典序差) 摘要:解题思路: 怎么说,是不是很方便 参考代码: ```c #include #include int main() { char s1[101],s2[101]; scanf("%…… 题解列表 2023年12月21日 0 点赞 0 评论 86 浏览 评分:0.0
蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:先算俩字符串字符个数,记为am,bm;再分俩种情况讨论(am=bm和am!=bm)注意事项:参考代码:#include<stdio.h>#include<string.h>// 是 C 语言…… 题解列表 2024年02月07日 0 点赞 0 评论 71 浏览 评分:0.0
1646: 蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:库里有strcmp函数,返回的就是第一个不一样的位置成功返回0注意事项:参考代码: #include<iostream> #include<string> #include…… 题解列表 2024年05月22日 0 点赞 0 评论 64 浏览 评分:0.0
简单易懂(c语言代码) 摘要:```c #include #include #define max(a,b) (a>b?a:b) // 宏定义,返回两个值中的较大者 #define MAX 101 …… 题解列表 2024年08月25日 1 点赞 0 评论 104 浏览 评分:0.0
蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char b[101],a[101]; scanf("%s …… 题解列表 2024年12月21日 0 点赞 0 评论 80 浏览 评分:0.0
最普通的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int strcmp_(char a[],char b[]){ int len1,len2; …… 题解列表 2024年12月27日 0 点赞 0 评论 71 浏览 评分:0.0