125412024-12-21 17:37:46arnoldbeilandVirágos rét (50 pont)cpp17Wrong answer 46/5018ms508 KiB
#include <iostream>
using namespace std;


int main()
{
    int N, K, V = 0;

    cin >> N >> K;

    for (int i = 0; i < N; i++) {
        int ertek;
        cin >> ertek;
        V += ertek;
    }

    cout << 1LL*(V-K+2)*(V-K+1)/2 << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base46/50
1Accepted0/01ms320 KiB
2Accepted0/01ms508 KiB
3Accepted0/018ms404 KiB
4Accepted2/21ms320 KiB
5Wrong answer0/21ms320 KiB
6Wrong answer0/21ms320 KiB
7Accepted3/31ms320 KiB
8Accepted3/31ms320 KiB
9Accepted3/31ms320 KiB
10Accepted2/21ms320 KiB
11Accepted3/31ms320 KiB
12Accepted2/21ms320 KiB
13Accepted3/31ms320 KiB
14Accepted2/217ms404 KiB
15Accepted2/217ms408 KiB
16Accepted3/317ms412 KiB
17Accepted3/317ms404 KiB
18Accepted3/318ms508 KiB
19Accepted3/318ms320 KiB
20Accepted3/317ms320 KiB
21Accepted3/318ms396 KiB
22Accepted3/317ms400 KiB