The 11th Blue Bridge Cup-Approximate number

Problem description
For an integer, the number that can divide the integer is called the divisor of this number.

For example: 1, 2, 3, and 6 are all divisors of 6.

How many divisors does 78120 have?

Answer submission
This is a question that fills in the blanks with the result. You only need to calculate the result and submit it.
The result of this question is an integer. Only fill in this integer when submitting the answer, and fill in the extra content will not be scored.


Answer: 96


Problem solution
mathematics:

#include <iostream>
using namespace std;

int main()
{
    
    
	int ans = 0;
	for (int i = 1; i <= 78120; i ++)
		if(78120 % i == 0)
			ans ++;
				
	cout << ans << endl;
	return 0;			
}

Lanqiao Cup C/C++ Group Provincial Competition Past Years Questions

Guess you like

Origin blog.csdn.net/weixin_46239370/article/details/115332489