Submission #6787061


Source Code Expand

Copy
n = gets.to_i
powers = gets.split.map(&:to_i).sort
sum = 0

n.times do
  a, _ = powers.pop(2)
  sum += a
end

puts sum

Submission Info

Submission Time
Task A - AtCoder Group Contest
User aocha
Language Ruby (2.3.3)
Score 300
Code Size 129 Byte
Status
Exec Time 189 ms
Memory 29156 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 00_example_01.txt, 00_example_02.txt
All 300 / 300 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt
Case Name Status Exec Time Memory
00_example_01.txt 7 ms 1788 KB
00_example_02.txt 7 ms 1788 KB
01.txt 7 ms 1788 KB
02.txt 7 ms 1788 KB
03.txt 7 ms 1788 KB
04.txt 7 ms 1788 KB
05.txt 19 ms 3192 KB
06.txt 166 ms 29156 KB
07.txt 136 ms 26468 KB
08.txt 189 ms 27600 KB
09.txt 188 ms 27600 KB
10.txt 188 ms 27600 KB