Doors in the Center

ABC 398

Problem 18 of 50

Easy

What to do

You need to create a string that is a palindrome (it reads the same forwards and backwards) and is made up of the characters '-' and '='. The string must have either one '=' or two adjacent '=' characters, and it has to be a specific length that you will provide.

Key Concepts

strings palindromes conditional statements loops

Examples

Input: 4

Output: -==-

Input: 7

Output: ---=---

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...