Triangle Quest

  • + 0 comments

    why isn't this allowed?

    for i in range (int(input())-1): print (int(format (2**(i+1)-1,'b'))*(i+1))

    edit: ok this is dumb but i think its because of the 'for' in 'format'. Can the dev pls patch this?

    if i use the following instead, it works: for i in range (int(input())-1): print (int(bin (2**(i+1)-1)[2:])*(i+1))