import java.util.Scanner; public class Main{ public static void main(String []args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if((n % 4 == 0 && n % 100 != 0) || (n % 400 == 0)){ System.out.printf("yes"); }else{ System.out.printf("no"); } } }这道题首先要知道什么是闰年(能被4整除但不能被100整除,或能被400整除),在运用逻辑符号。