Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.util.StringTokenizer;
  3.  
  4. public class Main {
  5.  
  6. public static void main(String[] args) throws Exception {
  7. Scanner sc = new Scanner(System.in);
  8. int t = Integer.valueOf(sc.nextLine());
  9. for(int i = 0; i < t; i++){
  10. int n = Integer.valueOf(sc.nextLine());
  11. int sum = 0;
  12. StringTokenizer st = new StringTokenizer(sc.nextLine());
  13. while(st.hasMoreTokens()){
  14. sum += Integer.valueOf(st.nextToken());
  15. }
  16. if(sum % 2 == 0){
  17. System.out.println("POSSIBLE");
  18. }
  19. else{
  20. System.out.println("IMPOSSIBLE");
  21. }
  22. }
  23.  
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement