Pyth , 81 80 바이트
.vh,K"?>J198\"BREAKING NEWS: WORLD ENDS\"s[\".vh,K\"N:KN+C92NN\"J\"?<J2*TT+J1"J1
온라인으로 사용해보십시오!
설명:
.vh,K" ... "J1
.v Eval pyth code
h Get the first item in list
, Make a list of the next two items
J1 Set J = 1 (J = 100 to 199 in future iterations)
K" ... " Set K to the given string
그리고 문자열의 코드는 다음과 같습니다.
?>J198"BNWE"s[".vh,K"N:KN+C92NN"J"?<J2*TT+J1
? Ternary: If A then B else C
>J198 Test if J > 198
"BNWE" String literal; If ternary was true, return this (which is then implicitly printed)
s[".vh,K"N:KN+C92NN"J"?<J2*TT+J1 ternary else
s concatenate list of strings
[ create list
".vh,K" string literal, list[0]
N N is set to the double-quote character, list[1]
:KN+C92N list[2]
: Regex substitution. In A, replace B with C
K Variable K (set to the string being eval'd)
N N is double-quote
+C92N A backslash followed by a double-quote
+ concat two strings
C92 character with code point 92 (backslash)
N N is double-quote
N N is double-quote, list[3]
"J" String literal, list[4]
?<J2*TT+J1 Inner ternary, list[5]
<J2 If J < 2 ..
*TT return T * T (10 * 10), else
+J1 return J+1
2Kparanoia: yes97
생성2Kparanoia: yes98
되므로 (4) 읽지 않아야Repeat to step 100, but step 101 will output "BREAKING NEWS: WORLD ENDS"
합니까? (즉2Kparanoia: yes99
, 뉴스를 생산합니다)