#include<bits/stdc++.h> using namespace std; int a[10001]; bool shuzi(int z,int e){ if(z%10e&&z/10%10e&&z/100%10e&&z/1000%10e&&z/10000%10==e){ return true; } else return false; } void dian(int x,int y){ int i=1; for(int q=1;q<=x;q++){ if(shuzi(q,y)==0){ a[q]=i; i++; } } int r=a[x]; return r; } int main(){ int m,t; cin>>m>>t; cout<<dian(m,t); return 0; }

4 条评论

  • @ 2025-2-21 13:02:20

    鸡大

    • @ 2025-2-18 11:05:08

      玩第五人格

      • @ 2024-11-18 8:40:37

        看注释,@ ws247wuhao1

        #include<bits/stdc++.h>
        using namespace std;
        
        
        int main()
        {
            int m,t,ans=0;
        
            cin >> m >> t;
            string ss = to_string(t);//把t转为string类型
            for(int i = 1;i <= m;i++)
            {
        
                string s = to_string(i);//把当前楼层转为string类型
        
                if(s.find(ss) != string::npos)//判断楼层数是否不等于没找到(就是找到了)
                {
        
                    ans++;
                }
            }
            cout << m-ans;
            return 0;
        }
        
        
        • @ 2024-10-24 17:17:32

          #include<bits/stdc++.h>

          using namespace std;

          int a[10001];

          bool shuzi(int z,int e){

          if(z%10e&&z/10%10e&&z/100%10==e&&z/1000%10e&&z/10000%10e){

          return true;
          

          }

          else return false; }

          void dian(int x,int y){

          int i=1;

          for(int q=1;q<=x;q++){

          if(shuzi(q,y)==0){
          
          a[q]=i;
          
          i++;
          
          } 
          

          }

          int r=a[x];

          return r; }

          int main(){

          int m,t;

          cin>>m>>t;

          cout<<dian(m,t);

          return 0; }

          • 1