        n = n / 10i64;
        num.push(rem);
    }

    for i in 1..num.len() {
        for j in 0..i {
            if num[i] < num[j] {
                num.swap(i, j);
                num[..i].sort_by_key(|&v| std::cmp::Reverse(v));