输入一个正整数N (1
样例输入
12
样例输出
6
样例说明
12的约数包括:1,2,3,4,6,12。共6个
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int count = 0;
for(int i = 1; i <= n; i++){
if(n % i == 0){
count++;
}
}
System.out.println(count);
scanner.close();
}
}