Submission #1437954


Source Code Expand

import Data.List

main = do
 [n,k] <- map read . words <$> getLine
 as <- map read . words <$> getLine
 print $ sum $ zipWith (+) [0..] $ take k (sort as) 

Submission Info

Submission Time
Task B - オークション
User aimy
Language Haskell (GHC 7.10.3)
Score 200
Code Size 160 Byte
Status AC
Exec Time 814 ms
Memory 41340 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 17
Set Name Test Cases
Sample sample1.txt, sample2.txt
All sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt
Case Name Status Exec Time Memory
in1.txt AC 810 ms 39932 KB
in10.txt AC 628 ms 39932 KB
in11.txt AC 642 ms 39804 KB
in12.txt AC 570 ms 36220 KB
in13.txt AC 1 ms 508 KB
in2.txt AC 615 ms 41340 KB
in3.txt AC 581 ms 39932 KB
in4.txt AC 574 ms 36220 KB
in5.txt AC 570 ms 36220 KB
in6.txt AC 571 ms 36220 KB
in7.txt AC 814 ms 39804 KB
in8.txt AC 686 ms 39804 KB
in9.txt AC 571 ms 36220 KB
sample1.txt AC 2 ms 508 KB
sample2.txt AC 2 ms 508 KB