13 바이트
약간 다른 접근법을 시도하고 4 바이트를 절약했습니다.
ƇQjȥḶGQɱ⁻Ñ€Ƈ⁻
시도 해봐:)
작동 원리
Ƈ # Pushes on the amount of milliseconds passed since 01/01/1970.
Qjȥ # Pushes 2001 onto the stack.
Qj # Pushes on the string "Qj"
ȥ # Converts the string into a number as base 98.
ḶGQɱ⁻Ñ€ # Loops 2001 times printing -1000 to 1000.
Ḷ # Consumes the 2001 and loops the following code 2001 times.
GQ # Pushes on the string "GQ"
ɱ # Pushes on the current counter of the loop (i)
⁻ # Subtracts (i - "GQ") since i is a number, the "GQ" is converted to a number which will fail.
# So, Noodel will treat the string as a base 98 number producing (i - 1000).
Ñ # Consume what is on the top of the stack pushing it to the screen followed by a new line.
€ # The end of the loop.
Ƈ⁻ # Calculates the duration of execution.
Ƈ # Pushes on the amount of milliseconds passed since 01/01/1970.
⁻ # Pushes on (end - start)
17 바이트
ƇGQȥḋɲṡ×2Ḷñ⁺1€ÑƇ⁻
시도 해봐:)
작동 원리
Ƈ # Pushes on the amount of milliseconds passed since 01/01/1970.
GQȥḋɲṡ×2 # Used to create the range of numbers to be printed.
GQ # Pushes on the string "GQ".
ȥ # Converts the string into number as if it were a base 98 number. (which is 1000)
ḋ # Duplicates the number and pushes it onto the stack.
ɲ # Since the item on top is already a number, makes the number negative (random thing I threw in at the very beginning when made the langauge and totally forgot it was there)
ṡ # Swaps the first two items on the stack placing 1000 on top.
×2 # Doubles 1000 producing... 2000
Ḷñ⁺1€Ñ # Prints all of the numbers from -1000 to 1000.
Ḷ # Consumes the 2000 to loop the following code that many times (now -1000 is on the top).
ñ # Prints the value on top of the stack followed by a new line.
⁺1 # Increment the value on top of the stack by 1.
€ # End of the loop.
Ñ # Since 1000 is still not printed, this consumes 1000 and prints it followed by a new line.
Ƈ⁻ # Calculates the number of milliseconds to execute program.
Ƈ # Pushes on the amount of milliseconds passed since 01/01/1970.
⁻ # Pushes on (end - start) in milliseconds.
# At the end, the top of the stack is pushed to the screen.
스 니펫은 완료하는 데 시간이 오래 걸리지 않도록 -4에서 4까지의 값을 사용합니다.
<div id="noodel" code="ƇFȥḶAɱ⁻Ñ€Ƈ⁻" input="" cols="10" rows="10"></div>
<script src="https://tkellehe.github.io/noodel/noodel-latest.js"></script>
<script src="https://tkellehe.github.io/noodel/ppcg.min.js"></script>