Long Columns. I'm asking for help

can you help me with the “Long Columns” problem? I go out to the compiler but it gives me 0 points.

#include <iostream>
#define MAX 1000005
using namespace std;
long long n,k,l[MAX],C=0;
long long M=0;
int nrt=0;
int main()
{
    cin>>n>>k;
    for(long long int i=0;i<n;++i) cin>>l[i];
    for(long long int i=0;i<n;++i)
    {
        while(l[i]>=k && nrt!=10 && k!=0)
        {
            ++C;
            ++nrt;
            l[i]-=k;
        }
        if(l[i]<k)
            M+=l[i];
        else M+=l[i];
        nrt=0;
    }
    cout<<C<<" "<<M;
    return 0;
}

“It is also known that after ten cuts an old column cannot
withstand any more force and thus will not be cut further (but may still be used)”.

Try this:
1 1
11

The right answer should be
11 0

1 Mi Piace

thank you for help you helped me a lot.