题目链接 输入t对数 a, b 求(b,a]内的每个数拆成素因子的个数和 这里每个数都可以写成素数的乘积,可以写成几个素数的和就有几个素因子,这里求的是(b,a]内的素因子和 思路: 素数的素因子个数是1 对于非素数A的素因子个数 = A/k + 1 其中k是素数,也是第一个素数,或者K是比A小的数,并且A%k==0 下面是利用K是比A小的数,并且A%k==0 void solve(){ Scanner sc = new Scanner(System.in); int t = sc.nextI…