216472026-01-13 17:43:09algoproBájital (80 pont)cpp17Wrong answer 12/8037ms820 KiB
// UUID: a99008c9-a9bc-42e5-92ac-6710d4546031
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, x;
    cin >> n >> x;

    vector <int> itemek(n);
    for(int i = 0; i < n; i++)
        cin >> itemek[i];
    
    int maradek = 0;
    for(int i = 0; i < n; i++)
        maradek += itemek[i] % x;

    int egesz = 0;
    for(int i = 0; i < n; i++)
        egesz += itemek[i] / x;
    
    if(egesz <= maradek)
        {
            cout << egesz;
            return 0;
        }
    else
        while(egesz <= maradek)
            {
                egesz--;
                maradek += x;
            }
    cout << egesz;
}
SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/01ms508 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/41ms316 KiB
8Wrong answer0/42ms508 KiB
9Wrong answer0/237ms564 KiB
10Wrong answer0/237ms564 KiB
11Wrong answer0/237ms804 KiB
12Wrong answer0/237ms816 KiB
13Wrong answer0/237ms752 KiB
14Wrong answer0/237ms564 KiB
15Wrong answer0/237ms564 KiB
16Wrong answer0/237ms748 KiB
17Wrong answer0/237ms564 KiB
18Wrong answer0/237ms796 KiB
19Wrong answer0/237ms564 KiB
20Wrong answer0/237ms564 KiB
21Wrong answer0/237ms564 KiB
22Wrong answer0/237ms564 KiB
23Wrong answer0/41ms316 KiB
24Accepted4/41ms316 KiB
25Wrong answer0/41ms316 KiB
26Accepted4/421ms820 KiB
27Wrong answer0/435ms564 KiB
28Wrong answer0/437ms564 KiB
29Wrong answer0/437ms564 KiB
30Accepted2/237ms564 KiB
31Accepted2/235ms564 KiB
32Wrong answer0/237ms564 KiB
33Wrong answer0/237ms756 KiB