题解:
#include<bits/stdc++.h>
using namespace std;
long long a[200001];
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
if(i1||i5||i==11)a[i]=1;
else if(i<5)a[i]=i;
else if(i>5&&i<=10)a[i]=min(a[i-1]+1,a[i-5]+1);
else a[i]=min(a[i-1]+1,min(a[i-5]+1,a[i-11]+1));
}
cout<<a[n];
return 0;
}