83282024-01-14 18:19:30eokorVirágos rét (50 pont)cpp17Wrong answer 37/5020ms4316 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,k,db=0;
    cin>>n>>k;
    int x;
    for(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
base37/50
1Accepted0/03ms1880 KiB
2Accepted0/03ms2124 KiB
3Accepted0/019ms2332 KiB
4Accepted2/23ms2392 KiB
5Accepted2/23ms2592 KiB
6Accepted2/23ms2800 KiB
7Accepted3/33ms3020 KiB
8Wrong answer0/33ms3156 KiB
9Accepted3/33ms3132 KiB
10Accepted2/23ms3340 KiB
11Accepted3/33ms3596 KiB
12Accepted2/23ms3472 KiB
13Accepted3/33ms3480 KiB
14Wrong answer0/218ms3596 KiB
15Wrong answer0/218ms3724 KiB
16Accepted3/319ms3756 KiB
17Accepted3/318ms3756 KiB
18Wrong answer0/319ms3884 KiB
19Accepted3/319ms4076 KiB
20Accepted3/319ms4316 KiB
21Accepted3/320ms4312 KiB
22Wrong answer0/319ms4308 KiB