Triangle Quest 2

Sort by

recency

|

1123 Discussions

|

  • + 0 comments

    print the correct output but keep getting 'invalid literal found' error. what a stupid exercise.

  • + 0 comments

    There are a BUNCH of hidden constraints on this problem:

     - only 1x for loop
     - only cant use str()
     - only 2x lines of code (is actualy in the description ... but not very well)
    

    This question should be re-written, retired, or moved to a code-golf section

  • + 1 comment
    for i in range(1,int(input())+1):
        print(*range(1, i), *range(i, 0, -1), sep="")
    

    Asked for one print statment Asked for on for loop

    I'm this close to loosing it with hackerank

  • + 1 comment
    for i in range(1,int(input())+1):
        print(*range(1, i), *range(i, 0, -1), sep="")
    

    Asked for one print statment Asked for on for loop

    I'm this close to loosing it with hackerank

  • + 0 comments

    this is my solution:

    for i in range(1,int(input())+1): print((111111111//10**(9-i))**2)