日期:2014-05-17 浏览次数:20729 次
/// <summary> /// 遍历指定位数之间的所有组合 /// </summary> /// <param name="minLength">最短位数</param> /// <param name="maxLength">最长位数</param> public static void testPassword(int minLength, int maxLength) { for (int i = minLength; i <= maxLength; i++) { long maxNum = (long)Math.Pow(62, i); for (long j = 0; j < maxNum; j++) { Console.WriteLine(ConvertTo62(j, i)); } } }