update code

This commit is contained in:
ShazidMahsrafi 2023-11-14 13:31:12 +06:00
parent f13756ff2b
commit ea48e963de

View File

@ -4,17 +4,8 @@ int main()
{ {
int n,i=5,count=0; int n,i=5,count=0;
cin>>n; cin>>n;
while(n>0) if(n%5)
{ cout<<n/5+1<<endl;
while(i>=1) else
{ cout<<n/5<<endl;
while(n-i>=0)
{
count++;
n=n-i;
}
i--;
}
cout<<count;
}
} }