QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#252636 | #7728. Ramen | LiLI | WA | 58ms | 52300kb | Java11 | 1.2kb | 2023-11-15 23:06:10 | 2023-11-15 23:06:11 |
Judging History
answer
import java.util.Scanner;
import java.util.ArrayList;
import java.io.*;
import java.util.StringTokenizer;
public class Main{
static BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw=new PrintWriter(new OutputStreamWriter(System.out));
static StringTokenizer tokenizer=new StringTokenizer("");
static String next() throws IOException {
while (!tokenizer.hasMoreTokens()) {
tokenizer = new StringTokenizer(reader.readLine());
}
return tokenizer.nextToken();
}
static int nextInt() throws IOException
{
return Integer.parseInt(next());
}
static double Double() throws IOException
{
return Double.parseDouble(next());
}
static long nextlong() throws IOException
{
return Long.parseLong(next());
}
public static void main(String[] args)throws IOException {
int n=nextInt();
int []a=new int[n];
for(int i=0;i<n;i++)
{
a[i]=nextInt();
}
int sum=0;
for(int i:a)
{
sum+=i;
}
if(sum%2==0)
{
pw.println("Yes");
}
else {
pw.println("No");
}
pw.close();
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 57ms
memory: 48844kb
input:
3 1 2 -5
output:
Yes
result:
ok YES
Test #2:
score: 0
Accepted
time: 48ms
memory: 48808kb
input:
5 2 -5 2 3 1
output:
No
result:
ok NO
Test #3:
score: 0
Accepted
time: 37ms
memory: 48760kb
input:
5 3 -2 1 -1 -1
output:
Yes
result:
ok YES
Test #4:
score: 0
Accepted
time: 41ms
memory: 52300kb
input:
5 -1 100 100 100 100
output:
No
result:
ok NO
Test #5:
score: -100
Wrong Answer
time: 58ms
memory: 48852kb
input:
5 3 -3 2 5 1
output:
Yes
result:
wrong answer expected NO, found YES [1st token]