Questions asked
analysis
This question is really doing it to confuse human behavior ......
This is another topic that Italy's administrator dalao are Tucao too, simply, but later changed it seems to change expression ......
Let's look at this question:
N-1 flip coins, each time there is not a coin flip, flipping is the i-th flip all the coins except the i-th coin.
So long as the n coins turn upside down on it, the number of which is n times.
Here is proof of a dalao write, it is worth learning:
Really tql, tql, tql ...
To footer mortal difficult to prove I ah (may be since I know the results would not bother to think how evidence hhh who knows)
AC Code (Java description language)
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
scanner.close();
int[] coins = new int[num];
System.out.println(num);
for (int i = 0; i < num; i++) {
for (int j = 0; j < num; j++) {
if (i != j){
coins[j] ^= 1;
}
}
StringBuilder builder = new StringBuilder();
for (int j = 0; j < num; j++) {
builder.append(coins[j]);
}
System.out.println(builder);
}
}
}