039. Number Code (Easier Version)

Codeforces
IDCF10269039
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You are using a code where letters in words map to digits in the following way: 0 = o 1 = i 3 = e 4 = a 5 = s 7 = t (the other digits will not be used in this problem) You've found a sequence of numbers, and you want to find which words the numbers correspond to using the code described above. For this problem, assume that the only letters in each word are the ones that map to numbers. The first line of input contains a positive integer _T_ indicating the number of test cases that follow. Each of the next _T_ lines contains a sequence of space-separated numbers consisting of the digits 0, 1, 3, 4, 5, and 7. Output _T_ lines, with each line consisting of the decoded sequence of words using the code described above. ## Input The first line of input contains a positive integer _T_ indicating the number of test cases that follow. Each of the next _T_ lines contains a sequence of space-separated numbers consisting of the digits 0, 1, 3, 4, 5, and 7. ## Output Output _T_ lines, with each line consisting of the decoded sequence of words using the code described above. [samples]
**Definitions** Let $ T \in \mathbb{Z}^+ $ be the number of test cases. For each test case $ k \in \{1, \dots, T\} $, let $ N_k = (d_{k,1}, d_{k,2}, \dots, d_{k,m_k}) $ be a sequence of digits, where each $ d_{k,i} \in \{0,1,3,4,5,7\} $. Define the mapping $ \phi: \{0,1,3,4,5,7\} \to \{o,i,e,a,s,t\} $ as: $$ \phi(0) = o,\quad \phi(1) = i,\quad \phi(3) = e,\quad \phi(4) = a,\quad \phi(5) = s,\quad \phi(7) = t $$ **Constraints** 1. $ 1 \le T \le \text{some upper bound (implied by input)} $ 2. For each $ k \in \{1, \dots, T\} $, each digit in $ N_k $ is in $ \{0,1,3,4,5,7\} $. **Objective** For each test case $ k $, output the string: $$ \phi(d_{k,1}) \phi(d_{k,2}) \cdots \phi(d_{k,m_k}) $$
API Response (JSON)
{
  "problem": {
    "name": "039. Number Code (Easier Version)",
    "description": {
      "content": "You are using a code where letters in words map to digits in the following way: 0 = o 1 = i 3 = e 4 = a 5 = s 7 = t (the other digits will not be used in this problem) You've found a sequence ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269039"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are using a code where letters in words map to digits in the following way:\n\n0 = o\n\n1 = i\n\n3 = e\n\n4 = a\n\n5 = s\n\n7 = t\n\n(the other digits will not be used in this problem)\n\nYou've found a sequence ...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ T \\in \\mathbb{Z}^+ $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ N_k = (d_{k,1}, d_{k,2}, \\dots, d_{k,m_k}) $ be a sequence of digits, wh...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments