题目
public class Main {static String s = "0123456789abcdef";//m 2 8 10 16public static int res(int n,int m) {StringBuffer sb = new StringBuffer(); while(n!=0) {sb.append(s.charAt(n%m));n/=m;}//转换为对应进制之后String s = sb.reverse().toString();char[] c = s.toCharArray();int num1 = n;int num2 = 0;int t = 0;for(int i=0;i<c.length;i++) {if(c[i]>='a'&&c[i]<='f') {num2+=c[i]-'a'+10;}else {t = Integer.parseInt(c[i]+"");num2+=t;}}return num2;}public static void main(String[] args) {int sum = 0;for(int i=1;;i++) {if(i%res(i,2) == 0&&i%res(i,8) == 0&&i%res(i,10) == 0&&i%res(i,16) == 0) {sum++;}if(sum == 2023) {System.out.println(i);return ;}}}
}