83292024-01-14 18:20:47asdasd123Virágos rét (50 pont)cpp17Wrong answer 3/509ms3532 KiB
#include <bits/stdc++.h>

using ll = long long;

using namespace std;

int main()
{
    ios::sync_with_stdio(0); cin.tie(0);
    int n, k;
    cin >> n >> k;
    int cnt = 0;
    for (int i = 0; i < n; i++)
    {
        ll x;
        cin >> x;
        cnt += x;
    }
    cout << (cnt - 2)*(cnt-1)/2;
    
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/03ms1888 KiB
2Accepted0/03ms2272 KiB
3Wrong answer0/09ms2216 KiB
4Wrong answer0/23ms2368 KiB
5Wrong answer0/23ms2344 KiB
6Wrong answer0/23ms2464 KiB
7Wrong answer0/33ms2700 KiB
8Accepted3/33ms3060 KiB
9Wrong answer0/33ms3016 KiB
10Wrong answer0/23ms2976 KiB
11Wrong answer0/33ms3252 KiB
12Wrong answer0/23ms3108 KiB
13Wrong answer0/33ms3208 KiB
14Wrong answer0/28ms3124 KiB
15Wrong answer0/28ms3276 KiB
16Wrong answer0/39ms3476 KiB
17Wrong answer0/39ms3356 KiB
18Wrong answer0/39ms3360 KiB
19Wrong answer0/39ms3456 KiB
20Wrong answer0/39ms3532 KiB
21Wrong answer0/39ms3344 KiB
22Wrong answer0/38ms3340 KiB