Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. def f(height):
  2. '''
  3. >>> f(1)
  4. 0
  5. >>> f(2)
  6. 101
  7. 0
  8. >>> f(3)
  9. 21012
  10. 101
  11. 0
  12. >>> f(5)
  13. 432101234
  14. 3210123
  15. 21012
  16. 101
  17. 0
  18. >>> f(10)
  19. 9876543210123456789
  20. 87654321012345678
  21. 765432101234567
  22. 6543210123456
  23. 54321012345
  24. 432101234
  25. 3210123
  26. 21012
  27. 101
  28. 0
  29. >>> f(15)
  30. 43210987654321012345678901234
  31. 321098765432101234567890123
  32. 2109876543210123456789012
  33. 10987654321012345678901
  34. 098765432101234567890
  35. 9876543210123456789
  36. 87654321012345678
  37. 765432101234567
  38. 6543210123456
  39. 54321012345
  40. 432101234
  41. 3210123
  42. 21012
  43. 101
  44. 0
  45. >>> f(26)
  46. 543210987654321098765432101234567890123456789012345
  47. 4321098765432109876543210123456789012345678901234
  48. 32109876543210987654321012345678901234567890123
  49. 210987654321098765432101234567890123456789012
  50. 1098765432109876543210123456789012345678901
  51. 09876543210987654321012345678901234567890
  52. 987654321098765432101234567890123456789
  53. 8765432109876543210123456789012345678
  54. 76543210987654321012345678901234567
  55. 654321098765432101234567890123456
  56. 5432109876543210123456789012345
  57. 43210987654321012345678901234
  58. 321098765432101234567890123
  59. 2109876543210123456789012
  60. 10987654321012345678901
  61. 098765432101234567890
  62. 9876543210123456789
  63. 87654321012345678
  64. 765432101234567
  65. 6543210123456
  66. 54321012345
  67. 432101234
  68. 3210123
  69. 21012
  70. 101
  71. 0
  72. '''
  73. # Insert your code here
  74.  
  75.  
  76. if __name__ == '__main__':
  77. import doctest
  78. doctest.testmod()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement