143752025-01-10 17:44:07AronBVirágos rét (50 pont)cpp17Wrong answer 5/5018ms548 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int ret, k, ossz = 0,szamlalo = 0;
    cin >> ret >> k;
    //vector<int> retek(ret);
    int n;
    for (int i = 0; i < ret; i++) {
        cin >> n;
        if (n == 1) {
            szamlalo += 1;
        }
    }
    for (int i = 0; i < max(szamlalo-1,0); i++) {
        ossz += i;
    }
    cout << ossz << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/50
1Accepted0/01ms316 KiB
2Accepted0/01ms316 KiB
3Wrong answer0/017ms316 KiB
4Wrong answer0/21ms508 KiB
5Accepted2/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/31ms316 KiB
8Accepted3/31ms508 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/21ms508 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/22ms316 KiB
13Wrong answer0/31ms548 KiB
14Wrong answer0/217ms396 KiB
15Wrong answer0/217ms404 KiB
16Wrong answer0/317ms316 KiB
17Wrong answer0/317ms400 KiB
18Wrong answer0/318ms400 KiB
19Wrong answer0/317ms396 KiB
20Wrong answer0/317ms396 KiB
21Wrong answer0/317ms400 KiB
22Wrong answer0/317ms400 KiB