216922026-01-13 18:09:19algoproBájital (80 pont)cpp17Wrong answer 40/8037ms820 KiB
// UUID: cdb0f048-0436-498b-b5ae-28f0cda119b1
#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(maradek < egesz)
    {
        cout << maradek + (egesz-maradek)*x/(x+1);
    }
    else{
        cout << egesz;
    }
}
SubtaskSumTestVerdictTimeMemory
base40/80
1Accepted0/01ms316 KiB
2Accepted0/01ms316 KiB
3Accepted2/21ms316 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms316 KiB
7Accepted4/42ms316 KiB
8Accepted4/42ms316 KiB
9Wrong answer0/235ms564 KiB
10Wrong answer0/237ms804 KiB
11Wrong answer0/237ms564 KiB
12Wrong answer0/237ms564 KiB
13Wrong answer0/237ms564 KiB
14Wrong answer0/237ms564 KiB
15Wrong answer0/237ms756 KiB
16Wrong answer0/237ms564 KiB
17Wrong answer0/237ms564 KiB
18Wrong answer0/237ms564 KiB
19Wrong answer0/237ms564 KiB
20Wrong answer0/237ms756 KiB
21Wrong answer0/237ms564 KiB
22Wrong answer0/237ms564 KiB
23Accepted4/42ms316 KiB
24Accepted4/42ms512 KiB
25Accepted4/41ms316 KiB
26Accepted4/420ms564 KiB
27Wrong answer0/435ms564 KiB
28Wrong answer0/435ms760 KiB
29Accepted4/435ms760 KiB
30Accepted2/235ms564 KiB
31Accepted2/235ms564 KiB
32Wrong answer0/237ms820 KiB
33Wrong answer0/237ms564 KiB