Fafa and his Company

题目

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;
}

 

上一篇:D - Counting Test Gym - 101532D 字符串


下一篇:新概念lesson6_percy buttons