📅  最后修改于: 2022-03-11 14:52:15.641000             🧑  作者: Mango
public static String makeBinaryString(int n) {
StringBuilder sb = new StringBuilder();
while (n > 0) {
sb.append(n % 2);
n /= 2;
}
sb.reverse();
return sb.toString();
}