标签:tor ++ std long cout names for 机试 algo
基本思想:
无;
关键点:
无;
#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
using namespace std;
typedef long long ll;
void charge(ll n) {
	int cnt = 0;
	ll sqt = sqrt(n);
	for (ll i = 1; i <= sqt; i++) {
		if (n%i == 0) {
			cnt++;
			if (n / i != i)
				cnt++;
		}
	}
	cout << cnt << endl;
}
int main() {
	int n;
	ll a;
	while (cin >> n) {
		for (int i = 0; i < n; i++) {
			cin >> a;
			charge(a);
		}
	}
}
标签:tor ++ std long cout names for 机试 algo
原文地址:https://www.cnblogs.com/songlinxuan/p/12461509.html