119182024-11-19 18:58:50banhelyiVirágos rét (50 pont)cpp17Wrong answer 4/5018ms552 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    int k;
    int szam;
    int ja=0;
    int j;
    cin >> n;
    cin >> k;
    for(int i=0; i < n; i++){
        cin >> j;
        ja += j;
    }
	int jo=(ja)-(k);
    jo=(jo+1)*(jo)/2;
    cout << ((ja>=k)?jo:0) << "\n";

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