Skip to main content
deleted 2 characters in body
Source Link
Business Cat
  • 9.2k
  • 1
  • 17
  • 37

Python 2, Rod

n=input()
l=[]
p=[n]
for i in range(n):
 lp=[]
 for t in l:
  lp[:len([])]=[n]
 for t in p:
  lp[:len([])]=[n]
 (l,p)=(p,lp)
print len(pl)

Try it online!Try it online!

Python 2, Rod

n=input()
l=[]
p=[n]
for i in range(n):
 lp=[]
 for t in l:
  lp[:len([])]=[n]
 for t in p:
  lp[:len([])]=[n]
 (l,p)=(p,lp)
print len(p)

Try it online!

Python 2, Rod

n=input()
l=[]
p=[n]
for i in range(n):
 lp=[]
 for t in l:
  lp[:len([])]=[n]
 for t in p:
  lp[:len([])]=[n]
 (l,p)=(p,lp)
print len(l)

Try it online!

Source Link
Business Cat
  • 9.2k
  • 1
  • 17
  • 37

Python 2, Rod

n=input()
l=[]
p=[n]
for i in range(n):
 lp=[]
 for t in l:
  lp[:len([])]=[n]
 for t in p:
  lp[:len([])]=[n]
 (l,p)=(p,lp)
print len(p)

Try it online!