题解 | 邮箱验证

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        String output = "邮箱格式不合法";
        if (str.contains("@qq.com") && !str.startsWith("@qq.com")) output = "邮箱格式合法";
        System.out.println(output);
    }
}

全部评论

相关推荐

01-12 20:31
东北大学 Java
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务