质数排列 分别找出质数和合数的数量,将两者的阶乘相乘即可 class Solution { public int numPrimeArrangements(int n) { int cnt = 0; for(int i = 2; i <= n; i++){ boolean flag = true; for(int j = 2; j*j <= i; j++){
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有