x 进制转 10 进制

Luogu
IDLGB3620
Time1000ms
Memory128MB
DifficultyP2
进制
给一个小整数 $x$ 和一个 $x$ 进制的数 $S$。将 $S$ 转为 $10$ 进制数。对于超过十进制的数码,用 `A`,`B`,$\ldots$ 表示。 ## Input 第一行一个整数 $x$; 第二行一个字符串 $S$。 ## Output 输出仅包含一个整数,表示答案。 [samples] ## Note 【数据规模和约定】 保证目标数在十进制下不超过 $10^9$,$2 \leq x \leq 36$。
Samples
Input #1
16
7B
Output #1
123
API Response (JSON)
{
  "problem": {
    "name": "x 进制转 10 进制",
    "description": {
      "content": "给一个小整数 $x$ 和一个 $x$ 进制的数 $S$。将 $S$ 转为 $10$ 进制数。对于超过十进制的数码,用 `A`,`B`,$\\ldots$ 表示。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P2"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB3620"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "给一个小整数 $x$ 和一个 $x$ 进制的数 $S$。将 $S$ 转为 $10$ 进制数。对于超过十进制的数码,用 `A`,`B`,$\\ldots$ 表示。\n\n## Input\n\n第一行一个整数 $x$;\n\n第二行一个字符串 $S$。\n\n## Output\n\n输出仅包含一个整数,表示答案。\n\n[samples]\n\n## Note\n\n【数据规模和约定】  \n\n保证目标数在十进制下不超过 $10^9...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments