109. H.

Codeforces
IDCF10269109
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Drawn an H. You will be given a number the represents the length of the legs and middle portion of the H. One number representing the dimensions of the H. Print the H. ## Input One number representing the dimensions of the H. ## Output Print the H. [samples]
Let $ n \in \mathbb{Z}^+ $ be the length of each leg and the middle bar of the H. **Objective** Print a pattern representing the letter H, composed of: - Two vertical legs, each of height $ n $, positioned at columns 1 and $ n $, - One horizontal bar of length $ n $, centered vertically at row $ \left\lceil \frac{n}{2} \right\rceil $, spanning from column 1 to column $ n $, - All other positions are empty (spaces). The pattern consists of $ n $ rows and $ n $ columns, where: - In row $ i $ (for $ i \in \{1, \dots, n\} $): - Print `H` at column 1 and column $ n $, - If $ i = \left\lceil \frac{n}{2} \right\rceil $, also print `H` at all columns $ j \in \{1, \dots, n\} $, - Otherwise, print `H` only at columns 1 and $ n $, and spaces elsewhere.
API Response (JSON)
{
  "problem": {
    "name": "109. H.",
    "description": {
      "content": "Drawn an H. You will be given a number the represents the length of the legs and middle portion of the H. One number representing the dimensions of the H.  Print the H. ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269109"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Drawn an H. You will be given a number the represents the length of the legs and middle portion of the H.\n\nOne number representing the dimensions of the H. \n\nPrint the H.\n\n## Input\n\nOne number represe...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "Let $ n \\in \\mathbb{Z}^+ $ be the length of each leg and the middle bar of the H.\n\n**Objective**\nPrint a pattern representing the letter H, composed of:\n- Two vertical legs, each of height $ n $, posi...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments