10 条题解

  • 3
    @ 2023-3-12 20:04:24
    #include<iostream>
    using namespace std;
    int main(){
    	int m,k,ans=0,t=0;
    	cin>>m>>k;
    	if(m%19==0){
    		if(m%3==0){
    		while(m%3==0){
    			m/=3;
    			t+=1;
    		}
    		if(t==k)cout<<"YES";
    		}else{
    			cout<<"NO";
    		}
    		
    	}else{
    		cout<<"NO";
    	}
    	return 0;
    }
    
    • 2
      @ 2023-7-8 16:03:29

      #include<stdio.h> #include<iostream> using namespace std; int main() { int m , k ; cin>>m>>k; cout<<"NO"<<endl;

      return 0 ;
      

      } //此为bug解法

      • 1
        @ 2023-3-12 20:18:01

        #include<bits/stdc++.h> using namespace std; int m,k; int pd(int x) { if(x3)return 1; return 0; } bool findd(int m,int k) { int sum=0,x=m; while(x) { sum+=pd(x%10); x/=10; } return sumk&&m%19==0; } int main() { cin>>m>>k; if(findd(m,k))cout<<"YES"; else cout<<"NO"; return 0; }

        • 1
          @ 2023-3-12 18:26:15
          #include<bits/stdc++.h>
          using namespace std;
          int m,k;
          int pd(int x)
          {
          	if(x==3)return 1;
          	return 0;
          }
          bool findd(int m,int k)
          {
          	int sum=0,x=m;
          	while(x)
          	{
          		sum+=pd(x%10);
          		x/=10;
          	}
          	return sum==k&&m%19==0;
          }
          int main()
          {
          	cin>>m>>k;
          	if(findd(m,k))cout<<"YES";
          	else cout<<"NO";
          	return 0;
          }
          
          • 1
            @ 2023-1-3 11:40:31
            #include<bits/stdc++.h>
            using namespace std;
            int m,k;
            int pd(int x)
            {
            	if(x==3)return 1;
            	return 0;
            }
            bool findd(int m,int k)
            {
            	int sum=0,x=m;
            	while(x)
            	{
            		sum+=pd(x%10);
            		x/=10;
            	}
            	return sum==k&&m%19==0;
            }
            int main()
            {
            	cin>>m>>k;
            	if(findd(m,k))cout<<"YES";
            	else cout<<"NO";
            	return 0;
            }
            
            • 1
              @ 2022-10-18 17:09:53
              #include<iostream>
              using namespace std;
              int main(){
              int a,b;
              cin >> a >> b;
              if (a % 19 == 0 && b % 10 == 3){
              	cout << "YES" << endl;
              } else {
              	cout << "NO" << endl;
              }
              }
              
              • 0
                @ 2023-12-12 16:44:18
                #include<bits/stdc++.h>
                using namespace std;
                int main(){
                	int m,k,ans=0;
                	cin>>m>>k;
                	if(m%19==0){
                		while(m!=0){
                			int ge=m%10;
                			if(ge==3) ans++;
                			m/=10;
                		}
                		if(ans==k) cout<<"YES";
                		else cout<<"NO";
                	}
                	else{
                		cout<<"NO";
                	}	
                
                	return 0;
                	
                }
                
                • 0
                  @ 2023-7-8 11:16:43

                  #include<iostream> #include<cmath> using namespace std; int n , k; int main() { cin >> n >> k; if(n % 19 == 0 && n / 3 > k) { cout << "YES"; } else { cout << "NO"; } return 0; }

                  • -1
                    @ 2022-10-18 17:07:10

                    #include<iostream>

                    #include<bits/stdc++.h>

                    using namespace std;

                    int main(){

                    int m,k,s=0;
                    
                    cin>>m>>k;
                    
                    if(m%19==0){
                    
                    	do{
                    
                    		if(m%10==3){
                    
                    			s++;	
                    
                    		}	
                    
                    		m/=10;
                    
                    	}while(m!=0);
                    
                    	if(s==k) cout<<"YES";
                    
                    	else cout<<"NO";
                    
                    }
                    
                    else{
                    
                    	cout<<"NO";
                    
                    }
                    
                    return 0;
                    

                    }

                    • -1
                      @ 2022-4-25 21:55:16

                      #include<iostream>

                      using namespace std;

                      int main(){

                      int a,b;
                      
                      cin >> a >> b;
                      
                      if (a % 19 == 0 && b % 10 == 3){
                      
                      	cout << "YES" << endl;
                      
                      } else {
                      
                      	cout << "NO" << endl;
                      
                      }
                      

                      }

                      • 1

                      信息

                      ID
                      909
                      时间
                      1000ms
                      内存
                      128MiB
                      难度
                      5
                      标签
                      递交数
                      367
                      已通过
                      129
                      上传者