83332024-01-14 18:26:06eokorVirágos rét (50 pont)cpp17Wrong answer 0/5020ms4248 KiB
#include <iostream>

using namespace std;

int main()
{
    long long int n,k,db;
    cin>>n>>k;
    long long int x;
    for(long long int i=1;i<=n;i++)
    {
        cin>>x;
        db+=x;
    }
    if(db>k)
        cout<<(db-k+1)*(db-k+2)/2;
    else cout<<0;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1748 KiB
2Wrong answer0/03ms2060 KiB
3Wrong answer0/020ms2128 KiB
4Wrong answer0/23ms2344 KiB
5Wrong answer0/23ms2584 KiB
6Wrong answer0/23ms2696 KiB
7Wrong answer0/33ms2776 KiB
8Wrong answer0/33ms3024 KiB
9Wrong answer0/33ms3116 KiB
10Wrong answer0/23ms3312 KiB
11Wrong answer0/33ms3524 KiB
12Wrong answer0/23ms3608 KiB
13Wrong answer0/33ms3760 KiB
14Wrong answer0/218ms3916 KiB
15Wrong answer0/218ms4020 KiB
16Wrong answer0/319ms4044 KiB
17Wrong answer0/319ms4104 KiB
18Wrong answer0/320ms4232 KiB
19Wrong answer0/319ms4240 KiB
20Wrong answer0/319ms4240 KiB
21Wrong answer0/320ms4240 KiB
22Wrong answer0/319ms4248 KiB