78992024-01-11 19:07:11AblablablaBájital (80 pont)cpp17Wrong answer 54/8039ms4224 KiB
#include <iostream>

using namespace std;

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

    int elso = 0;
    int masodik = 0;

    for(int i = 0; i < n; i++){
        int a;
        cin >> a;

        elso += a % x;
        masodik += a / x;
    }

    if(masodik < elso){
        cout << masodik << "\n";
    } else{
        cout << masodik - ((masodik - elso) / (x + 1) + ((masodik - elso) % (x + 1) == 0 ? 0 : 1)) << "\n";
    }
}
SubtaskSumTestVerdictTimeMemory
base54/80
1Accepted0/03ms1880 KiB
2Accepted0/03ms2116 KiB
3Accepted2/23ms2364 KiB
4Accepted2/23ms2576 KiB
5Accepted2/23ms2936 KiB
6Accepted2/23ms2796 KiB
7Accepted4/43ms2992 KiB
8Accepted4/43ms3084 KiB
9Wrong answer0/237ms3108 KiB
10Wrong answer0/237ms3112 KiB
11Wrong answer0/237ms3240 KiB
12Wrong answer0/237ms3468 KiB
13Wrong answer0/237ms3336 KiB
14Wrong answer0/237ms3332 KiB
15Wrong answer0/239ms3336 KiB
16Wrong answer0/237ms3464 KiB
17Wrong answer0/237ms3580 KiB
18Wrong answer0/239ms3528 KiB
19Wrong answer0/237ms3532 KiB
20Accepted2/237ms3664 KiB
21Accepted2/237ms3776 KiB
22Accepted2/237ms3760 KiB
23Accepted4/43ms3884 KiB
24Accepted4/43ms3952 KiB
25Accepted4/43ms3960 KiB
26Accepted4/423ms4060 KiB
27Accepted4/437ms3944 KiB
28Accepted4/437ms3948 KiB
29Accepted4/437ms3944 KiB
30Accepted2/237ms3948 KiB
31Accepted2/239ms3944 KiB
32Wrong answer0/237ms3944 KiB
33Wrong answer0/237ms4224 KiB