A. Add More Zero

Codeforces
IDCF10225A
Time1000ms
Memory128MB
Difficulty
English · Original
Formal · Original
There is a youngster known for amateur propositions concerning several mathematical hard problems. Today he is going to prepare a thought-provoking problem on a specific type of supercomputer which has the ability to support calculating operations for integers between $0$ and $(2^m -1)$ (inclusive). As a young man born with ten fingers, he loves the powers of $10$ so much, which results in his eccentricity that he always ranges integers he would like to use from $1$ to $10^k$ (inclusive). For ease of processing, all integers he would probably use in this interesting problem ought to be as computable as this supercomputer could. Given the positive integer $m$, your task is to determine maximum possible integer $k$ that is suitable for the specific supercomputer. The input contains multiple (about $10^5$) test cases. Each test case in only one line contains an integer $m$ ($1 <= m <= 10^5$). For each test case, output "_Case #x: y_" in one line (without quotes), where $x$ indicates the case number starting from $1$, and $y$ denotes the answer to the corresponding case. ## Input The input contains multiple (about $10^5$) test cases.Each test case in only one line contains an integer $m$ ($1 <= m <= 10^5$). ## Output For each test case, output "_Case #x: y_" in one line (without quotes), where $x$ indicates the case number starting from $1$, and $y$ denotes the answer to the corresponding case. [samples]
**Definitions** Let $ G = (V, E) $ be an undirected graph with $ |V| = n $ vertices (people) and $ |E| = m $ edges (friendship bonds). **Constraints** 1. $ 2 \leq n \leq 2 \times 10^3 $ 2. $ 0 \leq m \leq 2 \times 10^3 $ 3. Each edge connects two distinct vertices: $ \forall (a,b) \in E, a \ne b $ **Objective** Compute the **diameter** of $ G $, defined as: $$ k = \max_{u,v \in V} \operatorname{dist}(u,v) $$ where $ \operatorname{dist}(u,v) $ is the length of the shortest path between $ u $ and $ v $, or $ \infty $ if no path exists. If $ G $ is disconnected (i.e., $ \exists u,v \in V $ such that $ \operatorname{dist}(u,v) = \infty $), output "_=[_". Otherwise, output "_=]" followed by $ k $.
API Response (JSON)
{
  "problem": {
    "name": "A. Add More Zero",
    "description": {
      "content": "There is a youngster known for amateur propositions concerning several mathematical hard problems. Today he is going to prepare a thought-provoking problem on a specific type of supercomputer which h",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10225A"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There is a youngster known for amateur propositions concerning several mathematical hard problems.\n\nToday he is going to prepare a thought-provoking problem on a specific type of supercomputer which h...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ G = (V, E) $ be an undirected graph with $ |V| = n $ vertices (people) and $ |E| = m $ edges (friendship bonds).  \n\n**Constraints**  \n1. $ 2 \\leq n \\leq 2 \\times 10^3 $  \n2. $ ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments