s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s456821342 | p03658 | u914330401 | 1581107322 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | n, k = map(int, input().split())
li = sorted(list(map(int, input().split())), reverse=True)
print(li[0]+li[1]+li[2]) |
s637757650 | p03658 | u225388820 | 1580966732 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 99 | n,k=map(int,input().split())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[:k]) |
s513220833 | p03658 | u347640436 | 1580568458 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | N, K = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
print(sum(l[-K:])
|
s848991029 | p03658 | u442877951 | 1580250483 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 127 | l = list(map(int, input().split()))
N, K = map(int, input().split())
i = 0
std = sorted(l, reverse = True)
print(sum(std[0:K])) |
s188833120 | p03658 | u442877951 | 1580250148 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 145 | N = list(map(int, input().split()))
K = map(int, input().split())
l = 0
i = 0
std = sorted(N, reverse = True)
while i < K:
l += std[i]
i += 1 |
s309701526 | p03658 | u442877951 | 1580249739 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 150 | N = list(map(int, input().split()))
K = map(int, input().split())
l = 0
std = sorted(N, reverse = True)
for i = 0 and i <= K and i += 1:
l += std[i] |
s014110140 | p03658 | u427984570 | 1580212665 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | a,b = map(int,input().split())
l = sorted(list(map(int,input().split())),reverse=True)
print(sum[0:3]) |
s176046036 | p03658 | u344959886 | 1579629505 | Python | PyPy2 (5.6.0) | py | Runtime Error | 34 | 28012 | 126 | n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
a+=l[i]
print(a) |
s083392970 | p03658 | u344959886 | 1579629427 | Python | PyPy2 (5.6.0) | py | Runtime Error | 34 | 27884 | 127 | n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
a+=l[i]
print(a)
|
s922533844 | p03658 | u344959886 | 1579629376 | Python | PyPy2 (5.6.0) | py | Runtime Error | 36 | 27628 | 115 | n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort()
for i in range(k):
a+=l[i]
print(l)
|
s815774463 | p03658 | u979038517 | 1579201013 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 185 | N, K = [int(x) for x in input().split()]
lens = [int(x) for x in input().split()]
lens = sorted(lens).reverse()
if len(lens) >= K:
print(sum(lens))
else:
print(sum(lens[:K]))
|
s328845328 | p03658 | u609061751 | 1578540787 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 162 | import sys
input = sys.stdin.readline
N, K = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
l = sorted(l, reverse=True)
print(sum(l[K])) |
s359829943 | p03658 | u079022116 | 1578428690 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 162 | a,b=map(int,input().split())
l = [list(map(int,input().split())) for i in range(a)]
l=sorted(l)
l=l[::-1]
sum = 0
for i in range(b-1):
sum += l[i]
print(sum)
|
s523606368 | p03658 | u972892985 | 1577219570 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | n, k = map(int,input().split())
l = list(input())
a = sorted(l)[::1]
print(sum(a)[::a]) |
s446592686 | p03658 | u311669106 | 1577127071 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | n,k=map(int,input().split())
ln=[int(_) for _ in input().split()]
ans=0
ln.sorted(reverse=True)
print(sum(ln[0:k+1])) |
s482660025 | p03658 | u251582062 | 1576600821 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 245 | n, k = map(int, input().split())
mapa = map(int, input().split())
lista = list(mapa)
cont = 0
lixo = n-k
soma = 0
while cont < lixo:
print(min(lista))
lista.pop(min(lista)) #ta errado essa linha
cont = cont + 1
print(sum(lista))
|
s422614676 | p03658 | u691189979 | 1576600786 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 246 | n,k = input().split()
n = int(n)
k = int(k)
l = (int,input().split())
lista = list(l)
soma = 0
menor = 0
for num in lista:
while k > 0:
k = k - 1
menor = menor + min(lista)
soma = soma + num - menor
print(soma) |
s524522834 | p03658 | u629013088 | 1576491252 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 273 | n, k = map(int, input().split())
c = 0
lista = []
listamaior = []
while c < n:
l = int(input())
lista.append(l)
c += 1
lista.sort()
maior = lista[n - k]
for i in lista:
if maior <= i:
maior = i
listamaior.append(maior)
print(sum(listamaior)) |
s548496899 | p03658 | u629013088 | 1576491111 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 280 | n, k = map(int, input().split())
c = 0
c2 = 0
lista = []
listamaior = []
while c < n:
l = int(input())
lista.append(l)
c += 1
lista.sort()
maior = lista[n - k]
for i in lista:
if maior <= i:
maior = i
listamaior.append(maior)
print(sum(listamaior)) |
s692556885 | p03658 | u695079172 | 1576466514 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | n,k = map(int,input().split())
lst = list(map(int,input().split()))
lst.sort()
lst.reverse()
print(lst[0] + lst[1] + lst[2]) |
s899729365 | p03658 | u695079172 | 1576466452 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | n,k = map(int,input().split())
lst = list(map(int,input().split()))
lst.sort()
lst.reverse()
print(lst[0] * lst[1] * lst[2]) |
s321262001 | p03658 | u102242691 | 1575257590 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 |
N,K = map(int,input().split())
l = list(map(int,input().split()))
k = sorted(l)
print(k[-1] + k[-2] + k[-3])
|
s108672990 | p03658 | u161776322 | 1575009940 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | n, k = map(int, input().split())
print(sum(sorted(list(map(input(split()))), reverse = True)[0:k+1])) |
s759264815 | p03658 | u693953100 | 1574259794 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 132 | n,k = map(int,input().split())
l = list(map(int,input().split()))
l.sort()[::-1]
res = 0
for i in range(k):
res+=l[i]
print(res) |
s249495213 | p03658 | u452015170 | 1574162264 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | n, k = map(int, input().split())
l = list(map(int, input().split())).sort(reverse=True)
print(sum(l[0:k])) |
s423567251 | p03658 | u923659712 | 1574127861 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 100 | n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
a.reverse()
print(sum(0,k+1)) |
s849497389 | p03658 | u187109555 | 1574095910 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 177 | N, K = map(int, input().split())
Ls = map(int, input().split())
sorted_Ls = sorted(Ls, reverse=True)
length_sum = 0
for k in K:
length_sum += sorted_Ls[k]
print(length_sum) |
s355952577 | p03658 | u002539468 | 1573926729 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 202 | def main():
N, K = map(lambda i: int(i), input().split(' '))
l = list(map(lambda i: int(i), input().split(' '))
l.sort()
l.reverse()
m = 0
for i in range(K):
m += l[i]
print(m)
main() |
s686011750 | p03658 | u633548583 | 1573257506 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 115 | N,K=map(int,input().split())
li=[map(int,input().split())]
li_sort=sorted(li,reverse=True)
print(sum(li_sort[::K])) |
s269452896 | p03658 | u633548583 | 1573257338 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 114 | N,K=map(int,input().split())
li=[map(int,input().split())]
li_sort=sorted(li,reverse=True)
print(sum(li_sort[:K])) |
s873810611 | p03658 | u633548583 | 1573257122 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | N,K=map(int,input().split())
li=[int(input())]
li_sort=sorted(li,reverse=True)
print(sum(li_sort[:K])) |
s800114996 | p03658 | u281610856 | 1572930644 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | n, k = map(int, input().split())
L = list(map(int, input().split()))
L.sort()
L.reverse()
print(L[0] + L[1] + L[2]) |
s230254101 | p03658 | u755387488 | 1571184742 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 864 | #1行目を読み取る
line1 = input()
#スペースで区切る
splitLine1 = line1.split()
#それぞれをintに変換してn, kに代入する
#n, k = map(int, splitLine1)を分解
n = int(splitLine1[0])
k = int(splitLine1[1])
#2行目を読み取る
line2 = input()
#スペースで区切る
splitLine2 = line2.split()
#それぞれをintに変換してリストとして持つ
lengthList = []
for i in range(n):
eachLengthNum = int(splitLine... |
s590416322 | p03658 | u288948615 | 1571178763 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 91 | N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True))
print(L[0:K+1]) |
s455751924 | p03658 | u089376182 | 1570161341 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 89 | n, k = map(int, input())
print(sorted(map(int, input().split()), key = lambda x:-x)[0:k]) |
s833055896 | p03658 | u936985471 | 1569551938 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 143 | n,k=map(int,imput().split())
a=list(map(int,input().split()))
a=sorted(a)
sum=0
for i in range(len(a)-1,len(a)-k,-1):
sum=sum+a[i]
print(sum) |
s983392868 | p03658 | u724742135 | 1569539952 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 154 | N, K = [int(_) for _ in stdin.readline().rstrip().split()]
L = sorted([int(_) for _ in stdin.readline().rstrip().split()], reverse=True)
print(sum(L[:k])) |
s984551812 | p03658 | u819710930 | 1569423262 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | n,k=map(int,input().split())
l=sort(list(map(int,input().split())),reverse=True)
ans=0
for i in range(k): ans+=l[i]
print(ans) |
s830354422 | p03658 | u252828980 | 1569116011 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | n,k = map(int,input().split())
li = list(map(int,input().split()))
li.sort(reverse = True)
print(sum(li[:k]) |
s516999048 | p03658 | u925567828 | 1568924230 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 167 | n = int(input())
a = list(map(int, input().split()))
ans = 0
a.sort(reverse=True)
a_sum = sum(a[0:len(a):2])
b_sum = sum(a[1:len(a):2])
ans = a_sum-b_sum
print(ans) |
s342005628 | p03658 | u521866787 | 1568169176 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | n, k = map(int,input().split())
print(sum(sorted(list(map(int,input().split())).reverse=True)[0:k])) |
s472056946 | p03658 | u799479335 | 1568143595 | Python | Python (3.4.3) | py | Runtime Error | 163 | 12720 | 211 | import numpy as np
N,K = map(int, input().split())
ls = input().split()
ls_arr = np.array(N)
for i in range(N):
ls_arr[i] = int(ls[i])
ls_arr = np.sort(ls_arr)[::-1]
ans = int(ls_arr[:K].sum())
print(ans) |
s755881733 | p03658 | u721425712 | 1567823732 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | n, k = map(int, input().split())
L = list(map(int, input().split()))
L = L.sorted(reverse=True)
sum = 0
for i in L:
sum += L[i] |
s257341539 | p03658 | u721425712 | 1567823594 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | n, k = map(int, input().split())
L = list(map(int, input().split()))
L = L.sort(reverse=True)
sum = 0
for i in L:
sum += L[i] |
s774890727 | p03658 | u587213169 | 1567638086 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 149 | n, k = map(int, input().split())
l = list(map(int, input().split()))
l.sort(revese = True)
sum_l=0
for i in range(0,k):
sum_l+=l[i]
print(sum_l) |
s331930979 | p03658 | u587213169 | 1567637900 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 147 | n, k = map(int, input().split())
l = list(map(int, input().split))
l.sort(revese = True)
sum_l=0
for i in range(0,k):
sum_l+=l[i]
print(sum_l) |
s567408139 | p03658 | u243572357 | 1566708436 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 96 | n, k = map(int, input().split())
lst = list(map(int, input().split())
print(sum(sorted(lst)[:k]) |
s578346104 | p03658 | u243572357 | 1566708358 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | n, k = map(int, input().split())
lst = [int(input()) for i in range(n)]
print(sum(sorted(lst)[:k]) |
s493153068 | p03658 | u896741788 | 1566149330 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 99 | n,k=map(int,input().split())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[:k]) |
s555784514 | p03658 | u248670337 | 1565965254 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | n,k=map(int,input().split())
l=list(map(int,inout().split()))
print(sum(sorted(l)[:k][::-1])) |
s100374548 | p03658 | u791527495 | 1565904430 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 145 | N,K = map(int,input().split())
li = list(map(int,input().split()))
li.sort(reverse = True)
total = 0
for i in li[:K]
total += i
print(total) |
s309763837 | p03658 | u791527495 | 1565904306 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 148 | N,K = map(int,input().split())
li = list(map(int,input().split()))
li.sort(reverse = True)
total = 0
for i in li[:k-1]:
total += i
print(total) |
s856018590 | p03658 | u703442202 | 1565873034 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 171 | n,k = map(int,input.split())
n_list = list(map(int,input.split()))
n_list.sort()
n_list.reverse()
n_list[:k]
length = 0
for i in n_list[:k] :
length += i
print(length) |
s505937280 | p03658 | u703442202 | 1565872589 | Python | Python (3.4.3) | py | Runtime Error | 21 | 2940 | 186 | n,k = map(int,input().split())
n_list = list(map(int,input().split()))
n_list = n_list.sort()
n_list = n_list.reverse()
length = 0
for i in range(k + 1):
length += i
print(length)
|
s832484811 | p03658 | u282228874 | 1564711045 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 575 | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
using namespace std;
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define All(v) (v).begin(),(v).end()
using ll = long long;
con... |
s141583224 | p03658 | u324549724 | 1563978268 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 107 | n, k = map(int, input().split())
l = sort(list(map(int, input().split())), reverse=True)
print(sum(l[:k]))
|
s742551227 | p03658 | u556589653 | 1561744045 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | N,K = map(int,input().split())
l = list(map(int,input().split()))
ans = 0
l.sorted()
for i in range(K):
ans += l[i]
print(ans) |
s837663330 | p03658 | u898608852 | 1561420626 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | n,k=map(int,input().split())
l=list(map(int,input().split()))
ans=0
for i iin range(k):
m=max(l)
ans +=m
l.remove(m)
print(ans) |
s532035781 | p03658 | u623687794 | 1560463096 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | n,m=map(int,input().split())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(m)
ans+=l[i]
|
s657711625 | p03658 | u623687794 | 1560463007 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | n,m=map(int,input().split())
l=list(map(int,input().split()))
l.sort(reverse=True)
print(l[0]+l[1]+l[2]) |
s931787503 | p03658 | u102461423 | 1560324221 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 113 | n,k = map(int,input().split())
A = [int(x) for x in input().split()]
A.sort()
answer = sum(A[-K:])
print(answer) |
s989831333 | p03658 | u564906058 | 1560227107 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | n,k = map(int,input().split())
l = list(map(int,input().split())).sort()
s = 0
for i in range(k):
s += l[i]
print(s) |
s360327309 | p03658 | u778814286 | 1559953718 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38640 | 108 | N,K = map(int,input().split())
L = sorted(list[map(int,input().split())], reverse=True)
print(sum(L[:K]))
|
s340917656 | p03658 | u172111219 | 1559236776 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38512 | 102 | n,k = map(int,input().split())
l = [input() for _ in range(n)]
l.sort(reverse=True)
print(sum(l[:k])) |
s028803659 | p03658 | u680004123 | 1558116936 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | n, k = map(int, input().split())
l = list(map(int, input().split()))
l = sorted(l, reverse=True)
sum = 0
for i in range(k):
sum += l[i]
print(sum)
~ |
s591736602 | p03658 | u923712635 | 1556938526 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | N,K = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
l.sort(reversed = True)
print(sum(l[:K])) |
s432396814 | p03658 | u732870425 | 1556037712 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | N, K = map(int, input().split())
L = list(map(int, input().split()))
ans = 0
for i in range(K):
ans += L.pop(max(L))
print(ans) |
s387343897 | p03658 | u732870425 | 1556037688 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | N, K = map(int, input().split())
L = list(map(int, input().split()))
for i in range(K):
ans += L.pop(max(L))
print(ans) |
s861797507 | p03658 | u610473220 | 1555554370 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 151 | N, K = map(int, input().split())
lList = list(map(int, input().split())).sort(reverse = True)
ans = 0
for i in range(K):
ans += lList[i]
print(ans) |
s899186000 | p03658 | u844005364 | 1555451770 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | n, k = map(int, input().split())
a = map(int, input().split())
a.sort(reverse=True)
print(sum(a[:k])) |
s595274910 | p03658 | u844005364 | 1555451747 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 103 | n, k = map(int, input().split())
a = map(int, input().split())
a.sort(reverse=True)
print(sum(a[:k]) |
s880494233 | p03658 | u912862653 | 1554992074 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 152 | N, K = map(int, input().split())
l = list(map(int, input().split()))
ans = 0
for i in range(K):
m = max(l)
ans += m
l[l.find(str(m))] = 0
print(ans) |
s564379857 | p03658 | u912862653 | 1554992031 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 147 | N, K = map(int, input().split())
l = list(map(int, input().split()))
ans = 0
for i in range(K):
m = max(l)
ans += m
l[l.find(m)] = 0
print(ans) |
s145365214 | p03658 | u729133443 | 1554855747 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 63 | t,l=open(0);print(sum(sorted(map(int,l.split()))[-int(t[2:])])) |
s075691953 | p03658 | u771532493 | 1554769205 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | n,k=map(int,input().split())
l=[(int(i) for i in input().split())]
l.sort(reverse=True)
print(sum(l[:k]))
|
s213708615 | p03658 | u771532493 | 1554769177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 105 | n,k=map(inr,input().split())
l=[(int(i) for i in input().split())]
l.sort(reverse=True)
print(sum(l[:k])) |
s543578505 | p03658 | u859897687 | 1554228453 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 98 | n,k=map(int,input().split())
l=[int(input())for i in range(n)]
l.sort(reverse=1)
print(sum(l[:k])) |
s927420624 | p03658 | u635182517 | 1554007459 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 103 | N, K = map(int, input().split())
A = list(map(int, input().split())).sort()
A.revrese
print(sum(A[:K])) |
s877594117 | p03658 | u635182517 | 1554007326 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | N, K = map(int, input().split())
A = list(map(int, input().split())).sort().reverse()
print(sum(A[:K])) |
s809944988 | p03658 | u514299323 | 1553955166 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 185 | N, K = map(int,input().split(" "))
L = list(map(int,input().split(" ")))
L.sort(inverse = True)
length_of_snake = 0
for i in range(K):
length_of_snake += L[i]
print(length_of_snake) |
s545437149 | p03658 | u227082700 | 1553625688 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 89 | n,k,s=map(int,input().split()),list(map(int,input().split()));s.sort();print(sum(s[-k:])) |
s422213327 | p03658 | u102960641 | 1553440422 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
a.reversed()
print(sum(a[:m])) |
s721545822 | p03658 | u860546679 | 1553295441 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 245 | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int N,K;
cin>>N>>K;
int l[N];
for(int i=0;i<N;++i){
cin>>l[i];
}
sort(l,l+N,greater<int>());
int ans=0;
for(int i=0;i<K;++i){
ans+=l[i];
}
cout<<ans<<endl;
}
|
s266603109 | p03658 | u292810930 | 1552790336 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | K, N = map(int, input().split())
L = list(map(int, input().split())).sort(reverse=True)
print(sum(L[:K]))
|
s353396793 | p03658 | u652081898 | 1551248149 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | n, k = map(int, input().split())
l = sorted(list(map(int, input().split())))
l = list(reversed(l))
print(sum(:l[k-1])) |
s670849319 | p03658 | u964763428 | 1550543384 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 297 | #include <bits/stdc++.h>
using namespace std;
int main(){
int N, K;
cin >> N >> K;
std::vector<int> l(N);
for (int i = 0; i < N; i++) {
cin >> l.at(i);
}
sort(l.begin(), l.end());
int ans=0;
for (int i = N-1; i > N-1-K; i--) {
ans += l.at(i);
}
cout << ans << endl;
}
|
s768530215 | p03658 | u020604402 | 1550366257 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 341 | x , y = map(int,input().split())
if x % 3 == 0 or y % 3 == 0 or (x+y) % 3 ==0:
print("Possible")
else:
print("Impossible")
remote@G465:~/abc/067$ vim b.py
remote@G465:~/abc/067$ cat b.py
N ,K = map(int,input().split())
L = list(map(int,input().split()))
L = sorted(L)[::-1]
ans = 0
for i in range(K):
ans = a... |
s682032979 | p03658 | u350049649 | 1550207123 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 129 | N,K=map(int,input().split())
A=sorted(list(map(int,input().split()))).reverse()
ans=0
for i in range K:
ans+=A[i]
print(ans) |
s602900868 | p03658 | u045270305 | 1548995896 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 152 | l1 = input().split()
a, b = list(map(int, l1))
l2 = input().split()
l2 = list(map(int, l2))
l3 = sorted(l2)
sum = l3[-1] + l3[-2] + l3[-3]
print(sum)
|
s766957493 | p03658 | u186838327 | 1548161877 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 111 | n, k = map(int, input().split())
l = list(map(int, input().split()))
l.sort(reverse=True)
print(l[0]+l[1]+l[2]) |
s849252722 | p03658 | u362560965 | 1547071276 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 126 | N, K = map(int, input().split())
l = []
for i in range(N):
l.append(int(input()))
l.sort(reverse=True)
print(sum(l[:K])) |
s085371007 | p03658 | u371467115 | 1546465012 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 114 | n,k=map(int,input().split())
l=list(int(input()))
l.sort(reverse=True)
s=0
for i in range(k):
s+=l[i]
print(l) |
s804460663 | p03658 | u845427284 | 1546228375 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 170 | n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li.reverse()
length = 0
for l, i in Li:
length += 0
if i == k - 1:
break
print(length) |
s665523070 | p03658 | u928784113 | 1545145988 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 142 | N,K = map(int,input().split())
l = [map(int,input().split())]
m = sorted(l).reverse()
b = []
for i in range(K):
b.append(m[i])
print(sum(b)) |
s494959915 | p03658 | u928784113 | 1544920563 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 172 | # -*- coding: utf-8 -*-
N,K = map(int,input().split())
a = [int(i) for i in range(N)]
L = sorted(a)
M = a.reverse()
b = []
for j in range(K):
b.append(L(j))
print(sum(b)) |
s724308302 | p03658 | u928784113 | 1544919352 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 161 | # -*- coding: utf-8 -*-
N,K = map(int,input().split())
a = [int(i) for i in range(N)]
L = sorted(a)
L = L[::-1]
for i in range(N):
b.append(a[i])
print(sum(b)) |
s688539574 | p03658 | u728498511 | 1544073235 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 162 | n, k = map(int, input().split())
ans = 0
nums = list(map(int, input().split()))
nums.sort(reverse="True")
for i in range(k):
ans += nums.pop(0)
print(ans) |
s830079733 | p03658 | u728498511 | 1544073011 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 146 | n, k = map(int, input().split())
ans = 0
nums = list(map(int, input().split()))
nums.sort
for i in range(k):
ans += pop.nums(0)
print(ans) |
s183095478 | p03658 | u136869985 | 1541902132 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 682 | # NとKを数値入力させる
N, K = map(int, input().split())
# 棒を入れるリストを用意する
A = []
# N本の棒の長さを入力させる
for i in range(N):
# 数字を1つ入力させる
a = int(input())
# リストAに追加する
A.append(a)
# リストAをソートする.このとき引数にreverse = Trueを設定すると降順になる(デフォルトは昇順)
A = sorted(A, reverse = True)
# 現在リストAには大きい順に棒の長さが格納されている.
# 大きい方からK本の長さの総和が最大値なので初期... |
s352032506 | p03658 | u601522790 | 1541708582 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 134 | n,k = map(int, input().split())
l = int(input())
l = sorted(l, reverse=True)
ans = 0
for i in range(0,k - 1):
ans += l[i]
print(ans) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.