Sort by

recency

|

99 Discussions

|

  • + 1 comment

    There might be an error in code control, the following output matrix seems true.

    "3 1 4 2 5"

  • [deleted]
    + 0 comments

    Works

    print(9)
    print("5 2 4 9 7 3 1 6 8")
    
  • + 0 comments

    How old is this?

    In year 2000 as a recent Computer Grad, I resolved the Queens on chess board (from Java Deitel and Deitel): That is:

    How many queens can we add into a chess board so that no queen captures the other?! Output is 8, where they are a chess knight distance from each other

  • + 1 comment

    I test median time for N from 10 to 100 and complexity is N^5. It means, that for N=999, for 4-cores processor it take 48 full days. (can be several shorter or longer). I don't public my code and algorithm due to not spoil game.

  • + 0 comments

    This code is working, but after submitting it fails.Please someone help me arr = [] n=int(input()) print(n) for i in range(n): arr.append(list(map(str, input().rstrip().split()))) for i in range(n): for j in range(n): if arr[i][j]=='S': print((j+1),end=' ')