def main(): no_tests = int(input()) results = input() score = 0 group_len = int(no_tests / 10) for i in range(10): ptr = i * group_len if "N" not in results[ptr:ptr+group_len]: score += 1 print(score) if __name__ == "__main__": main()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | def main(): no_tests = int(input()) results = input() score = 0 group_len = int(no_tests / 10) for i in range(10): ptr = i * group_len if "N" not in results[ptr:ptr+group_len]: score += 1 print(score) if __name__ == "__main__": main() |