底层群友


私信TA

用户名:uq_12459991393

访问量:1461

签 名:

等  级
排  名 5455
经  验 1482
参赛次数 0
文章发表 8
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

TA的其他文章

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Scanner;


public class Main {
	static Scanner sc = new Scanner(new InputStreamReader(System.in));
        static OutputStreamWriter out = new OutputStreamWriter(System.out);
	public static void main(String[] args) throws Exception  {
		String s1 = sc.next();
		String s2 = sc.next();
		if(s1.length()!=s2.length()){
			out.write("1");
		}
		else {
			if(s1.equals(s2)){
				out.write("2");
			}
			else{
				if(s1.equalsIgnoreCase(s2)) out.write("3");
				else out.write("4");
			}
			
		}
		
        out.flush();
    }
}
 

0.0分

2 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区

灵活运用String方法
2022-01-18 11:02:21
  • «
  • 1
  • »