Codeforces 935A Fafa and his Company

题意:

    n名员工分为几个小组可以平均分开。小组数不为1

分析:

    求非自身的因子数。

#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define LL long long
#define N 10005
#define inf 0x3f3f3f3f
int main(){
    int n;
    cin>>n;
    int res=0;
    for(int i=n-1;i>=1;i--){
        if(n%i==0)res++;
    }
    cout<<res<<endl;
}


猜你喜欢

转载自blog.csdn.net/lj130lj/article/details/79995743