Submission #4662374
Source Code Expand
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] kusi = new int[2 * n]; for (int i = 0; i < 2 * n; i++) { kusi[i] = sc.nextInt(); } sc.close(); Arrays.sort(kusi); int ans = 0; for (int i = 0; i < 2 * n; i += 2) { ans += kusi[i]; } System.out.println(ans); } }
Submission Info
Submission Time | |
---|---|
Task | A - BBQ Easy |
User | KEN_RP |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 405 Byte |
Status | AC |
Exec Time | 107 ms |
Memory | 22740 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt |
All | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, sample-01.txt, sample-02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 107 ms | 21332 KB |
01-02.txt | AC | 101 ms | 21204 KB |
01-03.txt | AC | 99 ms | 20692 KB |
01-04.txt | AC | 100 ms | 21716 KB |
01-05.txt | AC | 106 ms | 18896 KB |
01-06.txt | AC | 101 ms | 22740 KB |
01-07.txt | AC | 102 ms | 20564 KB |
01-08.txt | AC | 90 ms | 21844 KB |
sample-01.txt | AC | 93 ms | 18900 KB |
sample-02.txt | AC | 93 ms | 21204 KB |