import java.math.BigDecimal; public class test { public static void main(String[] args) { BigDecimal one, ans; ans = one = BigDecimal.ONE; for (int i = 0; i < 1000; i++) { ans = one.add(ans); ans = one.divide(ans, 200, BigDecimal.ROUND_HALF_UP); Syst
nums[i][j] 存的是i位数的时候,首位数字是j的K好数的数目,i从1位开始的结果,去算2位时的结果,去算3位时的结果...最后得到l位的结果.K进制只是一个范围. import java.util.Scanner; public class _3K好数 { public static void main(String[] args) { long l,sum=0; long[][] num = new long[500][500]; int k; Scanner scanner = ne
import java.util.Scanner; public class _1区间K大数查询 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n= scanner.nextInt(); int[] shuzu = new int[n]; for (int i = 0; i < shuzu.length; i++) { shuzu[i] = scanner.next
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner aScanner = new Scanner(System.in); int n= aScanner.nextInt(); //读第一个 long a[] = new long[n]; //存放数组 long b[] = new long[n]; //备用数组