59712023-10-07 08:09:41mmatedBájital (80 pont)cpp17Wrong answer 54/80284ms4400 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n,x;
    cin>>n>>x;
    int a=0,b=0;
    int q;
    f(i,0,n)
    {
        cin>>q;
        a+=q/x;
        b+=q%x;
    }
    while(b<a)
    {
        a--;
        b+=x;
    }
    cout<<a<<"\n";
    
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base54/80
1Accepted0/03ms1924 KiB
2Accepted0/03ms2156 KiB
3Accepted2/24ms2372 KiB
4Accepted2/23ms2584 KiB
5Accepted2/23ms2744 KiB
6Accepted2/23ms2804 KiB
7Accepted4/43ms2932 KiB
8Accepted4/410ms3156 KiB
9Wrong answer0/214ms3232 KiB
10Wrong answer0/2143ms3456 KiB
11Wrong answer0/214ms3456 KiB
12Wrong answer0/252ms3448 KiB
13Wrong answer0/2127ms3660 KiB
14Wrong answer0/214ms3668 KiB
15Wrong answer0/214ms3664 KiB
16Wrong answer0/2119ms3664 KiB
17Wrong answer0/275ms3888 KiB
18Wrong answer0/245ms4152 KiB
19Wrong answer0/214ms4140 KiB
20Accepted2/239ms4028 KiB
21Accepted2/228ms4032 KiB
22Accepted2/224ms4132 KiB
23Accepted4/42ms4024 KiB
24Accepted4/43ms4024 KiB
25Accepted4/43ms4128 KiB
26Accepted4/410ms4100 KiB
27Accepted4/417ms4312 KiB
28Accepted4/414ms4400 KiB
29Accepted4/414ms4308 KiB
30Accepted2/214ms4400 KiB
31Accepted2/214ms4296 KiB
32Time limit exceeded0/2284ms3500 KiB
33Wrong answer0/2136ms4308 KiB