In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how SpringBoot integrates MybatisPlus to achieve string comparison. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Problem description
Given two strings consisting only of uppercase or lowercase letters (length between 1 and 10), the relationship between them is one of the following 4 cases:
1: the length of the two strings is different. Like Beijing and Hebei.
2: not only are the two strings equal in length, but also the characters in the corresponding positions are exactly the same (case sensitive), such as Beijing and Beijing
3: the two strings are equal in length, and the characters in the corresponding position can be exactly the same only if they are not case-sensitive (that is, it does not satisfy case 2). Like beijing and BEIjing.
4: two strings are equal in length, but even case-insensitive cannot make the two strings consistent. Like Beijing and Nanjing.
Programming determines which of the four categories belongs to the relationship between the two input strings, and gives the number of the class to which it belongs.
Input format
Consists of two lines, each of which is a string
Output format
There is only one number indicating the relationship number of the two strings
Submission code # include # include using namespace std;int main () {string str1,str2;;getline (cin,str1); getline (cin,str2); / / length is between 1 and 10 if (str1.size ()! = str2.size ()) / / str1.legth () cout is also available
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.