Guest User

Untitled

a guest
Jan 16th, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. def getdata(n):
  2. n -= 1
  3. alphabet = ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z')
  4.  
  5. rows = 1000000000
  6. columns = []
  7. current_column = 1
  8. current_row_first_val = 1
  9. for x in range(1,rows+1):
  10. if n < (x*702):
  11. current_column = x
  12. if x > 1:
  13. current_row_first_val = x*702-701
  14. index = current_row_first_val - n
  15. else:
  16. index = n
  17. break
  18.  
  19. for x in alphabet:
  20. columns.append(x)
  21.  
  22. for x in alphabet:
  23. for y in alphabet:
  24. columns.append(x+y)
  25. return str(current_column)+columns[index]
Add Comment
Please, Sign In to add comment