Submission #3792096


Source Code Expand

# -*- coding: utf-8 -*-
N,K = map(int,input().split()) #棒の個数、選ぶ棒の個数の入力
a = [int(i) for i in range(N+1)] #棒のそれぞれの長さの記入
L = sorted(a) #aを小さい順に並べる
L.reverse() #Lの要素を反転させる
b = [] #リストの作成
for j in range(K): 
  b.append(L[j])
print(sum(b))

Submission Info

Submission Time
Task B - Snake Toy
User whistlePCR
Language Python (3.4.3)
Score 0
Code Size 341 Byte
Status WA
Exec Time 18 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 1
WA × 1
AC × 1
WA × 9
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
All 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 17 ms 2940 KB
00_example_02.txt WA 18 ms 3060 KB
01.txt WA 18 ms 2940 KB
02.txt WA 18 ms 2940 KB
03.txt WA 18 ms 2940 KB
04.txt WA 18 ms 2940 KB
05.txt WA 18 ms 3060 KB
06.txt WA 18 ms 3060 KB
07.txt WA 18 ms 2940 KB
08.txt WA 18 ms 3060 KB