Java implementation of the Blue Bridge Cup simulation about the number of the number of

Problem Description
  1.2 million the number of divisors (calculated only about positive number).
The answer submitted
  This is a result of fill in the blank questions, you only need to submit to the calculated result. The results of this question is an integer, when submitting answers only to fill in the integer, fill in the extra content will not score.

package 第十三次模拟;

import java.util.Scanner;

public class Demo1约数 {
public static void main(String[] args) {
	int count=0;
	for (int i = 1; i <=1200000; i++) {
		if(1200000%i==0){
			count++;
		}
	}
	System.out.println(count);
}
}

Released 1472 original articles · won praise 10000 + · views 1.76 million +

Guess you like

Origin blog.csdn.net/a1439775520/article/details/104750205