Submission #1092480
Source Code Expand
import java.util.Scanner; /** * Created by srikanth on 04-02-2017. */ public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int even=0,odd=0; int N=scan.nextInt(); while(N-->0){ int i=scan.nextInt(); if(i%2==0){ even++; } else{ odd++; } } if(odd%2==1 && even>0) System.out.println("NO"); else{ System.out.println("YES"); } } }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | srisiro |
Language | Java8 (OpenJDK 1.8.0) |
Score | 300 |
Code Size | 594 Byte |
Status | AC |
Exec Time | 538 ms |
Memory | 32212 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt |
All | sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 529 ms | 31620 KB |
in10.txt | AC | 520 ms | 32196 KB |
in11.txt | AC | 130 ms | 9676 KB |
in12.txt | AC | 128 ms | 9552 KB |
in2.txt | AC | 516 ms | 32212 KB |
in3.txt | AC | 518 ms | 30492 KB |
in4.txt | AC | 535 ms | 30804 KB |
in5.txt | AC | 507 ms | 32164 KB |
in6.txt | AC | 516 ms | 30684 KB |
in7.txt | AC | 538 ms | 32132 KB |
in8.txt | AC | 522 ms | 31292 KB |
in9.txt | AC | 533 ms | 32036 KB |
sample1.txt | AC | 126 ms | 9676 KB |
sample2.txt | AC | 131 ms | 9676 KB |