其他分享
首页 > 其他分享> > Fafa and his Company

Fafa and his Company

作者:互联网

题目

样例

这道题典型的思维题,但是因为数据小,所以暴力模拟就好了!

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <string.h>
#define INF 0x3f3f3f3f
#define mem(a,b) memset(a,b,sizeof(a))
#define _for1(i,a,b) for( int i=(a); i<(b); ++i)
#define _for2(i,a,b) for( int i=(a); i>(b); i--)
#define _rep1(i,a,b) for( int i=(a); i<=(b); ++i)
#define _rep2(i,a,b) for( int i=(a); i>=(b); i--)
typedef long long ll;
using namespace std;
int main() {
	int n, i, c = 0;
	scanf("%d", &n);
	_rep1(i, 1, n / 2) {
		if (n % i == 0){
			c++;
		}
	}
	cout << c << endl;
	return 0;
}

 

标签:his,int,Company,memset,rep1,long,Fafa,include,define
来源: https://blog.csdn.net/weixin_43850736/article/details/97667155