Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.StringTokenizer;
- public class Main {
- public static void main(String[] args) throws Exception {
- Scanner sc = new Scanner(System.in);
- int t = Integer.valueOf(sc.nextLine());
- for(int i = 0; i < t; i++){
- int n = Integer.valueOf(sc.nextLine());
- int sum = 0;
- StringTokenizer st = new StringTokenizer(sc.nextLine());
- while(st.hasMoreTokens()){
- sum += Integer.valueOf(st.nextToken());
- }
- if(sum % 2 == 0){
- System.out.println("POSSIBLE");
- }
- else{
- System.out.println("IMPOSSIBLE");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement