import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String s=sc.next(); String []s2=s.split("&"); if(s2.length!=2){System.out.println("NO"); } else if(getS(s2[0]).equals(s2[1])&&isLow(getS(s2[0]))) System.out.println("YES"); else System.out.println("NO"); } static String getS(String s){ String s2=""; for (int i= s.length()-1; i >=0 ; i--) { s2+=s.charAt(i); } return s2; } static boolean isLow(String s){//判断是否全为小写 for (int i= s.length()-1; i >=0 ; i--) { if(!(s.charAt(i)>='a'&&s.charAt(i)<='z')) return false; } return true; } }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:515 |
【出圈】 (C语言代码)浏览:553 |
【绝对值排序】 (C++代码)浏览:672 |
【出圈】 (C语言代码)浏览:794 |
C语言程序设计教程(第三版)课后习题6.8 (C语言代码)浏览:522 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:780 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:789 |
1124题解浏览:592 |
数组与指针的问题浏览:716 |
蓝桥杯历届试题-翻硬币 (C++代码)浏览:874 |