83232024-01-14 17:55:32eokorVirágos rét (50 pont)cpp17Wrong answer 0/5020ms4580 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,k,db;
    cin>>n>>k;
    int x;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        db+=x;
    }
    cout<<(db-k+1)*(db-k+2)/2;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1880 KiB
2Wrong answer0/03ms2068 KiB
3Wrong answer0/019ms2280 KiB
4Wrong answer0/23ms2488 KiB
5Wrong answer0/23ms2700 KiB
6Wrong answer0/23ms2916 KiB
7Wrong answer0/33ms3128 KiB
8Wrong answer0/33ms3340 KiB
9Wrong answer0/33ms3700 KiB
10Wrong answer0/23ms3640 KiB
11Wrong answer0/33ms3644 KiB
12Wrong answer0/23ms3644 KiB
13Wrong answer0/33ms3760 KiB
14Wrong answer0/217ms3832 KiB
15Wrong answer0/218ms4076 KiB
16Wrong answer0/319ms4080 KiB
17Wrong answer0/318ms4084 KiB
18Wrong answer0/319ms4324 KiB
19Wrong answer0/318ms4360 KiB
20Wrong answer0/319ms4456 KiB
21Wrong answer0/320ms4580 KiB
22Wrong answer0/318ms4552 KiB