我的代码(算法借鉴他人)

#include <bits/stdc++.h>
using namespace std;
main()
{
	ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    int n;
    cin>>n;
    string a;
    cin>>a;
    int num=0;
    for(int i=0;i<a.size();i++)
    if(a[i]=='8')
    num++;
    cout<<min(num,n/11);
}

相关文章:

  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-05-06
猜你喜欢
  • 2021-12-22
  • 2022-12-23
  • 2021-12-29
  • 2021-10-22
  • 2021-05-24
  • 2021-07-13
  • 2022-12-23
相关资源
相似解决方案