143932025-01-10 18:03:04Perso4444Virágos rét (50 pont)cpp17Wrong answer 4/5018ms552 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, k; cin >> n >> k;
    int db = 0;
    for(int i = 0; i < n; i++){
        int x; cin >> x;
        db+=x;
    }
    int cnt = 0;
    for(int i = 1; i <= db; i++){
        if(i+k <= db){
            for(int j = i+k-1; j <= db; j++){
                cnt++;
            }
        }
    }
    cout << cnt;
}
SubtaskSumTestVerdictTimeMemory
base4/50
1Wrong answer0/01ms500 KiB
2Accepted0/01ms316 KiB
3Wrong answer0/018ms316 KiB
4Wrong answer0/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms552 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/21ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/31ms528 KiB
14Wrong answer0/217ms500 KiB
15Wrong answer0/217ms512 KiB
16Wrong answer0/317ms392 KiB
17Wrong answer0/317ms400 KiB
18Wrong answer0/318ms392 KiB
19Wrong answer0/318ms400 KiB
20Wrong answer0/317ms396 KiB
21Wrong answer0/318ms400 KiB
22Wrong answer0/317ms316 KiB