在悲惨世界的音乐作品中,有一首歌叫《红与黑》。这是这首歌的一部分:
红色-愤怒的人的鲜血!
黑色-过去的黑暗!
红色-一个即将黎明的世界!
黑色-最后的夜晚!
您的任务是将输入转换成响亮的“红色和黑色”国歌。
输入项
用换行符分隔的文本,或类似的合适文本输入。例如,
The blood of angry men!
The dark of ages past!
A world about to dawn!
The night that ends at last!
空输入未定义(超出范围)。
输出量
如果输入的长度(行数或输入数组的长度,或类似值)是奇数,则不输出任何内容或输出false。您提交的内容可能不会输出错误,也不会尝试输出正确的输出。
否则,将输入变成红色/黑色歌词。将行首的所有大写字母变为小写。添加Red
加一个分隔符的奇数行的前面,Black
加上一个(可见)分隔符的偶数行的前面。定界符也必须用空格包围,因此输出看起来是不拥挤的(和松散的;)。
现在您有了输出。
测试用例
输出定界符为-
。
In:
The blood of angry men!
The dark of ages past!
A world about to dawn!
The night that ends at last!
Out:
Red - the blood of angry men!
Black - the dark of ages past!
Red - a world about to dawn!
Black - the night that ends at last!
In:
test test
1
[][][]
BBB
Out:
Red - test test
Black - 1
Red - [][][]
Black - bBB
In:
I feel my soul on fire!
The color of desire!
The color of despair!
Out:
falsey OR nothing
In:
Red - I feel my soul on fire!
Black - My world if she's not there!
Out:
Red - red - I feel my soul on fire!
Black - black - My world if she's not there!