سؤال

I want to System.out.println/writeToFile every possible int that has 25 numbers which are either 0 or 1 (1101110001000001000111011, 1010111111110111111110101, ...).

This should be 2^25 (33554432) different ints.

Now my question: What is the smartest way to do this in Java?

Thanks in advance for your help!

PS: I would love if you could give me code for this.

هل كانت مفيدة؟

المحلول

The term "brute force" implies, that the solution is not that smart, else you wouldn't have to use brute force ...

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top