It seems that my expression ability is quite problematic.
Do it again
Require to generate a text file with content being a, b and spaces, but the total number of a and b is 60.
The first line cannot have spaces and must be interlaced like ababab, not like bba or aab.
For example:
Suppose the first randomly obtained letter is a, then write a into b.txt
Then obtain the second randomly obtained letter, suppose it is a again, then write it below the previously obtained a. If it is b, then write it in the first line of b.txt, that is, side by side with the first a.
Continue to obtain the randomly obtained letter, then judge whether it is the same as the previous letter. If it is the same, write it directly below the previous letter. Note: "is the previous letter", otherwise write it in the first line.
Then the final result obtained in this way will be the following format of text.
Do it again
Require to generate a text file with content being a, b and spaces, but the total number of a and b is 60.
The first line cannot have spaces and must be interlaced like ababab, not like bba or aab.
For example:
Suppose the first randomly obtained letter is a, then write a into b.txt
Then obtain the second randomly obtained letter, suppose it is a again, then write it below the previously obtained a. If it is b, then write it in the first line of b.txt, that is, side by side with the first a.
Continue to obtain the randomly obtained letter, then judge whether it is the same as the previous letter. If it is the same, write it directly below the previous letter. Note: "is the previous letter", otherwise write it in the first line.
Then the final result obtained in this way will be the following format of text.
ababababa
a ab b ba
ab b a
b a
致精致简!
