How to abbreviate long numbers?

I am designing an interface that has some extreme cases in which a user's balance could be incredibly large, such as 11 digits.

enter the description of the image here

As these are extreme cases, I do not want to change the user interface to take them into account. I want to be able to shorten the number, while still allowing people to understand its meaning.

In the same way you can show 1256 how 1.2k How would you show something like 23583578321?

python: generation of random numbers from a list, where some of these numbers can be moved from the list as the program progresses

I am writing a program in which I have a "group" of 6 people trying to guess a number between 1 and 6. If the first person does well, then 1 is added to their score, but if not, the second person guesses. If they are right, 1 is added to their score and so on. However, the second person cannot guess the same number as the first person; This is the problem I had problems with. For some reason I am getting

TypeError: the object of type & # 39; NoneType & # 39; It has no len ()

I thought NoneType was a kind of variable thing, but I'm not really sure. The code is below. Could anyone help me?

Code image

java: delete three consecutive numbers in a matrix

I am a beginner in programming, I started about 2 months with Java, changing the careers of the law.

Recently I applied for an internship, but I was denied because I could not do the pre-interview test correctly.

One of the tasks was to continue removing 3 consecutive equal integers from the matrix until the list is empty or does not have 3 same consecutive numbers. The task HERE – <<

This is my code:

public int brothersInTheBar(int() glasses){

    return 0;

ArrayList glassesAsList = new ArrayList(); -> glassesAsList.add(i));

int counter=0;
for (int x=0;x

return counter;

I returned the email asking what I did wrong, in order to improve in the future. The company's response only said that I have to analyze the complexity of the algorithm further and that my code is inefficient.

So my question is how to improve my algorithm and what's wrong? Also, if you have time, you can look at the first source code of the application. I also asked what was wrong, but I only got the answer that it is not good and nothing else.

data structures: relationship between binary numbers and binomial heaps

I understand that a binomial heap can be represented as binary numbers according to the degree of each tree, but what exactly is the relationship between inserting a new node in the binomial heap and increasing the binomial number.

On top of that, I suppose there is a relationship between performing the union in two binomial heaps and adding the two binary numbers of the binomial heaps, but what exactly is the relationship.

I'm looking for something like a formal / textbook or relationship definition (if possible)

sequences and series: regularization of the sum of all prime numbers

In the spirit of a similar question for the harmonic series, is there a way to regularize the sum (divergent) of all prime numbers?

$$ sum_ {p text {prime}} p $$

Neither of these two questions about MathSE obtained a successful regularization:

The main zeta function, unfortunately, has a natural limit in the imaginary line that prevents analytical continuation by the usual means.

On the other hand, we know that

$$ prod_ {p text {prime}} p = 4 pi ^ 2 $$

find the longest sequence of consecutive numbers in descending order

I have a list (5,2,7,4,3,2,0,8, 9,
I need to go out (100,99,98,97)
but I'm getting 4, 3, 2, 100, 99, 98, 97, 93, 92

`arr=(5,2,7,4,3,2,0,8, 9,100,99,98,97,93,92)
 for i in range(len(arr)-1):

            if(arr(i) not in z):
            if(arr(i+1) not in z):

Combinatorial: "two-dimensional" Catalan numbers?

Suppose $ L $ it's a finished language $ {(,), (,) } $ defined by formal grammar

$$ S to Lambda $$
$$ S a (S) S $$
$$ S a (S) S $$

Suppose $ L (n, m) $ it is the sublanguage of all the words that contain exactly $ n $ letters '$ ($'Y $ m $ letters '$ ($’. Let's define $ C (n, m): = | L (n, m) | $.

Is there any kind of explicit formula for $ C (n, m) $?

I only know three facts about that sequence:

$$ C (n, m) = C (m, n) $$

$ C (n, 0) $ is he $ n $-th number of Catalan.

The sequence generating function. $ C (n, m) $ which $ G (x, y): = sum_ {n = 1} ^ infty sum_ {m = 1} ^ infty C (n, m) x ^ ny ^ m $ satisfies equality

$$ G (x, y) = xyG (x, y) ^ 2 + f (x) + f (y) + 1 $$

where $ f $ It is a function that generates Catalan numbers.

However, I couldn't deduce anything else from that.

java – Convert decimal numbers to binary

I have the code where I enter a certain number of numbers that go from 0 to 9 these numbers I store them in an int type arrangement then I have to convert each of the numbers that are in the 4-digit binary array that is if in the fix is ​​a 1 its equivalent in binary would be 0001 if I enter the 4 its equivalent would be 0100 etc. I already have the code that transforms the numbers into binary but the problem is that if I enter 1 only as binary 01 I don't know how to add the missing zeros I leave my code here:

     public static void main(String() args) {
            String f_h;
            String fecha_hora;
            fecha_hora = JOptionPane.showInputDialog(null, "Ingrese la fecha dd/mm/aa y la hora");
            f_h = fecha_hora.replaceAll("/|\s|:", "");
            int() digitos = new int(14);
            String cad;
            int ent;
            char() caracteres = f_h.toCharArray();
            for (int i = 0; i < caracteres.length; i++) {
                cad = Character.toString(caracteres(i));
                ent = Integer.parseInt(cad);
                digitos(i) = ent;
            for (int i = 0; i < digitos.length; i++) {
            for (int i = 0; i < digitos.length; i++) {

    public static String obtenerBinario(int numero) {
        ArrayList binario = new ArrayList();
        int resto;
        String binarioString = "";

        do {
            resto = numero % 2;
            numero = numero / 2;
            binario.add(0, Integer.toString(resto));
        } while (numero >= 2);

        binario.add(0, Integer.toString(numero));

        for (int i = 0; i < binario.size(); i++) {
            binarioString += binario.get(i);
        return binarioString;

List of United Arab Emirates phone numbers

You are already sleeping soundly when you hear your cell phone ring. You wake up thinking that the call could be something important. Try to answer the call only to discover that the line has already been cut. You stare at the screen of your mobile phone and see an unknown cell phone number as the caller. If you receive such mysterious calls frequently, you may not have a good night's rest. The only solution to this is to find out who the persistent caller is and their intentions. You can do it with the help of a free list of United Arab Emirates phone numbers. To know how to use this type of service, read on. How to use a free reverse cell phone number search service There is a number search service on the Internet that you can use for free. This service allows you to track the person behind a specific cell phone number. If you have had missed calls or mysterious calls from an unknown number, you can search for the responsible person with an online search service. The first thing to do is go to a site that offers this. Once you are on a free website to search for numbers, you can enter the concern number in the search box. Once you click on the search button, the process begins. You wait a few seconds and then you get a name and, if possible, also a location.
[Image: United-Arab-Emirates-Phone-Number-List.png? W = 1000]

Inequality of complex numbers $ n ^ 2 – ( Re (z ^ 2 + z ^ 4 + … + z ^ 2n)) ^ 2 geq ( Im (1 + z ^ 2 + … + z 2n)) ^ 2 $

Yes $ n $ it is a positive integer and $ z in mathbb {C} $ with $ | z | = $ 1,
Test it:

$$ n ^ 2 – ( Re (z ^ 2 + z ^ 4 + … + z ^ 2n)) ^ 2 geq ( Im (1 + z ^ 2 + … + z ^ { 2n})) ^ 2 $$

Why $ 1 $ it is real, $ Im (1) = 0 $, so I can ignore it and try to try:

$$ n ^ 2 – ( Re (z ^ 2 + z ^ 4 + … + z ^ 2n)) ^ 2 geq ( Im (z ^ 2 + z ^ 4 + … + z ^ 2n)) ^ 2 $$

I know that in general $ | z | ^ 2 = ( Re (z)) ^ 2 + ( Im (z)) ^ 2 $, so the inequality is:

$$ | z ^ 2 + z ^ 4 + … + z2n | ^ 2 leq n ^ 2 $$

and I can prove this with triangular inequality

$$ | z ^ 2 + z ^ 4 + … + z2n | le | z ^ 2 | + | z ^ 4 | + … + | z 2n | = n $$

So this should be done. Is this reasoning correct? Are there other ways to prove this inequality?