Triple Four

ABC 396

Problem 20 of 50

Easy

What to do

You have a list of numbers, and you need to check if any number appears three times in a row. If you find such a group of numbers, you should say 'Yes', otherwise say 'No'.

Key Concepts

if-statements loops arrays/lists input/output

Examples

Input: [1, 4, 4, 4, 2]

Output: Yes

Input: [2, 4, 4, 2, 2, 4]

Output: No

Tips for Beginners

  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first

Python Editor

Loading Python...