Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import static java.lang.Math.*;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt(), s = sc.nextInt(), ans = 0;
- for (int i = 1; i < n; i++)
- ans += sc.nextInt() != s ? 1 : 0;
- System.out.println(ans == 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment