1 条题解

  • 0
    @ 2024-12-24 9:14:32

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int M;
    	cin>>M;
    	if(M==1){
    		cout<<"5";
    	}
    	else if(M==2){
    		cout<<"3";
    	}
    		else if(M==3){
    		cout<<"8";
    	}
    		else if(M==4){
    		cout<<"3";
    	}
    		else if(M==5){
    		cout<<"4";
    	}
    		else if(M==6){
    		cout<<"2";
    	}	
    	else if(M==7){
    		cout<<"2";
    	}
    	else if(M==8){
    		cout<<"0";
    	}
    		else if(M==9){
    		cout<<"9";
    	}
    		else if(M==10){
    		cout<<"2";
    	}
    		else if(M==11){
    		cout<<"0";
    	}
    		else if(M==12){
    		cout<<"1";
    	}
    	else{
    		cout<<"";
    	}
    
    	
    	
    	return 0;
    }
    

    Python :

    # coding=utf-8
    a=int(input())
    n=['0','5','3','8','6','4','2','2','0','9','2','0','1']
    print(n[a])
    
    • 1

    信息

    ID
    569
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者