78982024-01-11 18:47:51AblablablaBájital (80 pont)cpp17Wrong answer 54/80264ms19516 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{
        while(masodik > elso){
            masodik--;
            elso += x;
        }

        cout << masodik << "\n";
    }
}
SubtaskSumTestVerdictTimeMemory
base54/80
1Accepted0/03ms1876 KiB
2Accepted0/03ms2124 KiB
3Accepted2/24ms2364 KiB
4Accepted2/23ms2704 KiB
5Accepted2/23ms2648 KiB
6Accepted2/23ms2784 KiB
7Accepted4/44ms3020 KiB
8Accepted4/412ms3392 KiB
9Wrong answer0/237ms3992 KiB
10Wrong answer0/2167ms4908 KiB
11Wrong answer0/237ms5588 KiB
12Wrong answer0/276ms6008 KiB
13Wrong answer0/2150ms7016 KiB
14Wrong answer0/237ms7848 KiB
15Wrong answer0/237ms8748 KiB
16Wrong answer0/2142ms9540 KiB
17Wrong answer0/298ms10324 KiB
18Wrong answer0/268ms11168 KiB
19Wrong answer0/237ms12196 KiB
20Accepted2/264ms12748 KiB
21Accepted2/254ms13636 KiB
22Accepted2/248ms14200 KiB
23Accepted4/43ms13932 KiB
24Accepted4/43ms14048 KiB
25Accepted4/43ms13936 KiB
26Accepted4/424ms14200 KiB
27Accepted4/439ms14928 KiB
28Accepted4/437ms15608 KiB
29Accepted4/437ms16416 KiB
30Accepted2/237ms17292 KiB
31Accepted2/239ms18192 KiB
32Time limit exceeded0/2264ms17912 KiB
33Wrong answer0/2160ms19516 KiB