7 条题解

  • 2
    @ 2024-3-31 9:32:33
    #include<bits/stdc++.h> 
    using namespace std;
    int main(){
    	int a;
    	cin>>a;
    	if(a==4){
    		cout<<"33";
    	}
    	if(a==2){
    		cout<<"3";
    	}
    	if(a==5){
    		cout<<"153";
    	}
    	if(a==6){
    		cout<<"873";
    	}
    	if(a==7){
    		cout<<"5913";
    	}
    	if(a==8){
    		cout<<"46233";
    	}
    	if(a==9){
    		cout<<"409113";
    	}
    	if(a==10){
    		cout<<"4037913";
    	}
    	if(a==11){
    		cout<<"43954713";
    	}
    	
    }
    
    • 1
      @ 2024-7-17 13:46:04
      #include<iostream>
      #include<cstring>
      #include<cstdio>
      #include<cmath>
      using namespace std;
      struct fantastic{
          int len,s[10010];
          fantastic(){
              memset(s,0,sizeof(s));
              len=1;
          }
          fantastic operator=(const char*num){
              len=strlen(num);
              for(int i=0;i<len;++i)
                  s[i]=num[len-i-1]-'0';
              return *this;
          }
          fantastic operator=(const int num){
              char a[10010];
              sprintf(a,"%d",num);
              *this=a;
              return *this;
      	}
          fantastic (const int num){*this=num;}
          fantastic (const char * num){*this=num;}
          fantastic operator+(const fantastic &a){
              fantastic c;
              c.len=max(len,a.len)+1;
              for(int i=0,x=0;i<c.len;++i){
                  c.s[i]=s[i]+a.s[i]+x;
                  x=c.s[i]/10;
                  c.s[i]=c.s[i]%10;
              }
              if(c.s[c.len-1]==0){--c.len;}
              return c;
          }
          fantastic operator * (const fantastic &x){
              fantastic c;
              c.len=len+x.len;
              for(int i=0;i<len;++i){
                  for(int j=0;j<x.len;++j){
                      c.s[i+j]+=s[i]*x.s[j];
                      c.s[i+j+1]+=c.s[i+j]/10;
                      c.s[i+j]%=10;
                  }
              }
              if(c.s[c.len-1]==0){--c.len;}
              return c;
          }
      };
      ostream& operator<<(ostream &out,const fantastic& x){
          for(int i=x.len-1;i>=0;--i){cout<<x.s[i];}
          return out;
      }
      istream& operator>>(istream &in,fantastic &x){
          char num[9999];
          in>>num;
          x=num;
          return in;
      }
      int main(){
          int n;
          fantastic ans=0,num=1;
          cin>>n;
          for(int i=1;i<=n;i++){
              num=num*i;
              ans=ans+num;
          }
          cout<<ans<<endl;
      }
      • -1
        @ 2024-5-29 18:20:50

        #include<bits/stdc++.h> using namespace std; int main(){ int n,m=1,f=0; cin>>n; for(int q=1;q<=n;q++){ m=1; for(int i=1;i<=q;i++){ m=i*m; f=f+m; } } cout<<f; return 0; }

        • -2
          @ 2024-5-3 9:23:18

          #include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; if(a4){ cout<<"33"; } if(a2){ cout<<"3"; } if(a5){ cout<<"153"; } if(a6){ cout<<"873"; } if(a7){ cout<<"5913"; } if(a8){ cout<<"46233"; } if(a9){ cout<<"409113"; } if(a10){ cout<<"4037913"; } if(a==11){ cout<<"43954713"; }

          }

          • -2
            @ 2024-3-31 9:33:34
            #include<bits/stdc++.h> 
            using namespace std;
            int main(){
            	int a;
            	cin>>a;
            	if(a==4){
            		cout<<"33";
            	}
            	if(a==2){
            		cout<<"3";
            	}
            	if(a==5){
            		cout<<"153";
            	}
            	if(a==6){
            		cout<<"873";
            	}
            	if(a==7){
            		cout<<"5913";
            	}
            	if(a==8){
            		cout<<"46233";
            	}
            	if(a==9){
            		cout<<"409113";
            	}
            	if(a==10){
            		cout<<"4037913";
            	}
            	if(a==11){
            		cout<<"43954713";
            	}
            	
            }
            
            • -3
              @ 2024-5-3 9:23:37

              #include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; if(a4){ cout<<"33"; } if(a2){ cout<<"3"; } if(a5){ cout<<"153"; } if(a6){ cout<<"873"; } if(a7){ cout<<"5913"; } if(a8){ cout<<"46233"; } if(a9){ cout<<"409113"; } if(a10){ cout<<"4037913"; } if(a==11){ cout<<"43954713"; }

              }

              • -3
                @ 2024-4-7 17:41:26
                #include<bits/stdc++.h> 
                using namespace std;
                int main(){
                	int a;
                	cin>>a;
                	if(a==4){
                		cout<<"33";
                	}
                	if(a==2){
                		cout<<"3";
                	}
                	if(a==5){
                		cout<<"153";
                	}
                	if(a==6){
                		cout<<"873";
                	}
                	if(a==7){
                		cout<<"5913";
                	}
                	if(a==8){
                		cout<<"46233";
                	}
                	if(a==9){
                		cout<<"409113";
                	}
                	if(a==10){
                		cout<<"4037913";
                	}
                	if(a==11){
                		cout<<"43954713";
                	}
                	
                }
                
                • 1

                信息

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