30
ASCII三角形
您的任务是编写一个打印ASCII三角形的程序或函数。他们看起来像这样: |\ | \ | \ ---- 您的程序将采用单个数字输入n,并带有约束0 <= n <= 1000。上面的三角形的值为n=3。 ASCII三角形将具有n反斜杠(\)和竖线(|),n+1线和破折号(-),并且每行除最终行外还将具有等于行号(从0开始,即第一行为行0)的空格。 。 例子: 输入: 4 输出: |\ | \ | \ | \ ----- 输入: 0 输出: 在此测试用例中,输出必须为空。没有空格。 输入: 1 输出: |\ -- 输入和输出必须完全是我指定的方式。 这是代码高尔夫球,因此请争取尽可能短的代码!
30
code-golf
ascii-art
code-golf
rubiks-cube
code-golf
path-finding
maze
regular-expression
code-golf
math
rational-numbers
code-golf
kolmogorov-complexity
graphical-output
code-golf
tips
code-golf
string
permutations
code-golf
sorting
base-conversion
binary
code-golf
tips
basic
code-golf
number
number-theory
fibonacci
code-golf
date
code-golf
restricted-source
quine
file-system
code-golf
code-golf
math
code-golf
ascii-art
code-golf
math
primes
code-golf
code-golf
math
matrix
code-golf
string
math
logic
factorial
code-golf
palindrome
code-golf
quine
stateful
code-golf
interactive
code-golf
board-game
code-golf
math
arithmetic
code-golf
string
code-golf
math
matrix
code-golf
math
abstract-algebra
polynomials
code-golf
date
code-golf
string
array-manipulation
sorting
code-golf
game
code-golf
string
code-golf
ascii-art
decision-problem
code-golf
number
sequence
code-golf
code-golf
code-golf
sequence
fibonacci
code-golf
math
geometry
random
code-golf
code-golf
math
decision-problem
fractal
rational-numbers
code-golf
number
number-theory
code-golf
combinatorics
permutations
card-games
code-golf
math
sequence
array-manipulation
fibonacci
code-golf
sequence
decision-problem
graph-theory
code-golf
ascii-art
parsing
lisp
code-golf
string
math
natural-language
logic
code-golf
math
logic
code-golf
string
alphabet
code-golf
string
code-golf
string