6 条题解

  • 2
    @ 2025-8-18 16:03:10
    #include <iostream>
    #include <cmath>
    using namespace std;
    int n, x, ans;
    void f(int x, int last)
    {
    	for(int i = last; i <= sqrt(x); i ++)
    		if(x % i == 0)
    		{
    			ans ++;
    			f(x / i, i);
    		}
    }
    int main()
    {
    	cin >> n;
    	while(n --)
    	{
    		ans = 1;
    		cin >> x;
    		f(x, 2);
    		cout << ans << endl;
    	}
    	return 0;
    }
    
    • 0
      @ 2026-7-17 14:11:06
      #include<bits/stdc++.h>
      using namespace std;
      int n,a,ans;
      void nj(int a,int b){
      	for(int c=b;c<=sqrt(a);c++)
      		if(a%c==0){
      			ans++;
      			nj(a/c,c);
      		}
      }
      int main(){
      	cin>>n;
      	while(n--){
      		ans=1;
      		cin>>a;
      		nj(a,2);
      		cout<<ans<<endl;
      	}
      	return 0;
      }
      
      • 0
        @ 2025-7-17 16:58:01
        #include <bits/stdc++.h>
        using namespace std;
        const int N=1e4+10;
        int n, a[N][N],ans=1,t;
        void f(int n,int last){
            for(int i=last;i<=n/2;i++){
            	if(n%i==0&&i<=n/i){
            		ans++;
            		f(n/i,i);
        		}
        	}
            
        }
        int main(){
            cin>>t;
            while(t--){
            	cin>>n;
            	f(n,2);
            	cout<<ans<<endl;
            	ans=1;
        	}
            return 0;
        }
        
        
        • 0
          @ 2025-6-14 19:24:28
          #include <bits/stdc++.h>
          using namespace std; 
          int f(int a, int b) 
          { 
              if(a==1) return 1; 
              int s=0; 
              for(int i=b;i <= a;i++) 
                  if(a % i == 0) s+=f(a/i,i); 
              return s; 
          } 
          int main() 
          { 
              int n; 
              cin >> n; 
              while(n--) 
              { 
                  int x; 
                  cin >> x; 
                  cout<<f(x,2)<<"\n"; 
              } 
              return 0; 
          }
          
          • 0
            @ 2025-6-14 19:21:03
            #include <bits/stdc++.h>
            using namespace std;
            #define LL long long
            const int N = 1e5 + 10;
            const int INF = 0x3f3f3f3f;
            int f(int a, int b)
            { if(a==1) return 1; int s=0; for(int i=b;i <= a;i++) if(a % i == 0) s+=f(a/i,i); return s; } int main() { int n; cin >> n; while(n--) { int x; cin >> x; cout<<f(x,2)<<"\n"; } return 0; }
            //菜鸟驿站
            //老六专属
            • -1
              @ 2023-12-10 8:59:20

              #include using namespace std; int f(int a, int b) { if(a==1) return 1; int s=0; for(int i=b;i <= a;i++) if(a % i == 0) s+=f(a/i,i); return s; } int main() { int n; cin >> n; while(n--) { int x; cin >> x; cout<<f(x,2)<<"\n"; } return 0; }

              • 1

              信息

              ID
              1232
              时间
              1000ms
              内存
              128MiB
              难度
              6
              标签
              递交数
              421
              已通过
              138
              上传者