Untitled
unknown
java
a year ago
457 B
4
Indexable
import java.util.Scanner; public class P1 { public static boolean Sol(int n) { while (n != 0) { if (n % 10 % 2 == 1) { return false; } n /= 10; } return true; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); // System.out.println(Sol(n)); // Sol(n); if (Sol(n)) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Editor is loading...
Leave a Comment