# Untitled

Apr 16th, 2021
682
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. # 27421
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
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
34. # count = 0
35. # maximum = 0
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
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