darya_leushkina

Untitled

Apr 16th, 2021
682
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 27421
  2. # f = open('C:/Users/darya/Downloads/24_demo.txt')
  3. # s = f.read()
  4. # count = 0
  5. # maximum = 0
  6. # for i in range(0, len(s)):
  7. #     if s[i-1] != s[i]:
  8. #         count += 1
  9. #     else:
  10. #         if count > maximum:
  11. #             maximum = count
  12. #         count = 1
  13. #
  14. # if count > maximum:
  15. #     maximum = count
  16. # print(maximum)
  17.  
  18. # 27686
  19. # f = open('C:/Users/darya/Downloads/24_demo (1).txt')
  20. # s = f.read()
  21. # count = 0
  22. # maximum=0
  23. # for i in range(len(s)):
  24. #     if s[i] == 'X':
  25. #         count += 1
  26. #     else:
  27. #         maximum = max(maximum, count)
  28. #         count = 0
  29. # maximum = max(maximum, count)
  30. # print(maximum)
  31.  
  32. # 27689
  33. # f = open('C:/Users/darya/Downloads/24_demo.txt')
  34. # count = 0
  35. # maximum = 0
  36. # s = f.read()
  37. # for i in range(len(s)):
  38. #     if s[i] == 'X' and count % 3 == 0:
  39. #         count += 1
  40. #     elif s[i] == 'Y' and count % 3 == 1:
  41. #         count += 1
  42. #     elif s[i] == 'Z' and count % 3 == 2:
  43. #         count += 1
  44. #     else:
  45. #         maximum = max(count, maximum)
  46. #         count = 0
  47. # maximum = max(count, maximum)
  48. # print(maximum)
  49.  
  50. # 27694
  51. # f = open('C:/Users/darya/Downloads/zadanie24_1.txt')
  52. # s = f.read()
  53. # count = 0
  54. # maximum = 0
  55. # for i in range(len(s)):
  56. #     if s[i] == 'A' and count % 2 == 0:
  57. #         count += 1
  58. #     elif s[i] == 'B' and count % 2 == 1:
  59. #         count += 1
  60. #     else:
  61. #         maximum = max(count, maximum)
  62. #         count = 0
  63. # maximum = max(count, maximum)
  64. # print(maximum)
  65. #
  66. # РАЗОБРАТЬ 29672
  67.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×