92942024-02-20 11:04:25KristófBájital (80 pont)cpp17Wrong answer 12/8039ms4768 KiB
#include <iostream>
#include <vector>
#include <bits/stdc++.h>



using namespace std;

int main()
{
    int n;
    cin>>n;
    int x;
    cin>>x;
    int m;
    vector <int> menny;
    for(int i=0;i<n;i++){
        cin>>m;
        menny.push_back(m);
    }
    int meg=0;
    int i=0;
    int ism=0;
    int max;
    for(int i=0;i<n;i++)
    {
        meg+=menny[i]/x;
        max+=menny[i]%x;
    }
    if(max>=meg){
    cout<<meg;
    }
    else
    {
        cout<<meg-(meg-max)/(x+1);
    }



    return 0;
}
SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/03ms1688 KiB
2Wrong answer0/03ms1852 KiB
3Wrong answer0/23ms2096 KiB
4Wrong answer0/23ms2308 KiB
5Wrong answer0/23ms2396 KiB
6Wrong answer0/23ms2400 KiB
7Wrong answer0/43ms2532 KiB
8Wrong answer0/43ms2708 KiB
9Wrong answer0/239ms4032 KiB
10Wrong answer0/237ms4120 KiB
11Wrong answer0/237ms4120 KiB
12Wrong answer0/237ms4120 KiB
13Wrong answer0/239ms4332 KiB
14Wrong answer0/237ms4332 KiB
15Wrong answer0/237ms4332 KiB
16Wrong answer0/237ms4416 KiB
17Wrong answer0/237ms4424 KiB
18Wrong answer0/239ms4336 KiB
19Wrong answer0/237ms4460 KiB
20Wrong answer0/237ms4540 KiB
21Wrong answer0/237ms4540 KiB
22Wrong answer0/239ms4636 KiB
23Wrong answer0/42ms3504 KiB
24Accepted4/43ms3420 KiB
25Wrong answer0/43ms3444 KiB
26Accepted4/423ms4556 KiB
27Wrong answer0/437ms4540 KiB
28Wrong answer0/437ms4692 KiB
29Wrong answer0/437ms4544 KiB
30Accepted2/237ms4544 KiB
31Accepted2/237ms4540 KiB
32Wrong answer0/239ms4768 KiB
33Wrong answer0/237ms4756 KiB