Python 3, 90(削除) 90 (削除ここまで) 83 bytes
deflambda f(n):'\n'.join([' for'*i+'\\'for i in range(n):print(']+[' '*i+'\\''*(n+~i)
for+'/'for i in range(n-1,-1,-1):print(' '*i+'/'])
Not very clever but it's the best I could come up with. Here's a slightly nicer version that's 12-7 bytes longer:
Python 3 , 102 bytes
def f(n):a=[' '*i+'\\'for i in range(n)];b=[i.replace('\\','/')for i in a[::-1]];print(*a,*b,sep='\n')
Try it online! thanks to @squid
Python 3, 90 bytes
def f(n): for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with. Here's a slightly nicer version that's 12 bytes longer:
Python 3 , 102 bytes
def f(n):a=[' '*i+'\\'for i in range(n)];b=[i.replace('\\','/')for i in a[::-1]];print(*a,*b,sep='\n')
Python 3, (削除) 90 (削除ここまで) 83 bytes
lambda n:'\n'.join([' '*i+'\\'for i in range(n)]+[' '*(n+~i)+'/'for i in range(n)])
-7 bytes thanks to @squid
Python 3, 90 bytes
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with. Here's a slightly nicer version that's 12 bytes longer:
Python 3 , 102 bytes
def f(n):a=[' '*i+'\\'for i in range(n)];b=[i.replace('\\','/')for i in a[::-1]];print(*a,*b,sep='\n')
Python 3, 90 bytes
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with.
Python 3, 90 bytes
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with. Here's a slightly nicer version that's 12 bytes longer:
Python 3 , 102 bytes
def f(n):a=[' '*i+'\\'for i in range(n)];b=[i.replace('\\','/')for i in a[::-1]];print(*a,*b,sep='\n')
Python 3Python 3, 8990 bytes
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with.
Python 3, 89 bytes
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with.
Python 3, 90 bytes
def f(n):
for i in range(n):print(' '*i+'\\')
for i in range(n-1,-1,-1):print(' '*i+'/')
Not very clever but it's the best I could come up with.