189022025-11-10 10:47:30birozsVásárlások inflációs hatása (75 pont)python3Accepted 75/7593ms3364 KiB
N,K = map(int,input().split())
T = list(map(int,input().split()))
T.sort()
osszeg = 0
for i in range(N):
    osszeg += T[i]
    for j in range(i+1,N):
        if N - j <= K:
            T[j] += T[i]
print(osszeg)

SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/016ms3068 KiB
2Accepted0/079ms3112 KiB
3Accepted1/116ms2868 KiB
4Accepted1/116ms2868 KiB
5Accepted1/116ms2880 KiB
6Accepted1/116ms2868 KiB
7Accepted1/117ms2868 KiB
8Accepted1/116ms2888 KiB
9Accepted1/116ms2964 KiB
10Accepted1/116ms2864 KiB
11Accepted2/216ms2868 KiB
12Accepted5/517ms3120 KiB
13Accepted5/517ms3364 KiB
14Accepted5/521ms3124 KiB
15Accepted5/532ms3312 KiB
16Accepted5/579ms3192 KiB
17Accepted5/578ms3116 KiB
18Accepted5/587ms3132 KiB
19Accepted5/581ms3248 KiB
20Accepted5/593ms3124 KiB
21Accepted5/579ms3124 KiB
22Accepted5/582ms3208 KiB
23Accepted5/585ms3124 KiB
24Accepted5/582ms3124 KiB