digit 函数

Luogu
IDLGB2145
Time1000ms
Memory128MB
DifficultyP1
函数与递归
在程序中定义一函数 $digit(n,k)$,它能分离出整数 $n$ 从右边数第 $k$ 个数字。 ## Input 正整数 $n$ 和 $k$。 ## Output 一个数字。 [samples] ## Note $n \le 10^9$。 $k \le 10$。
Samples
Input #1
31859 3
Output #1
8
API Response (JSON)
{
  "problem": {
    "name": "digit 函数",
    "description": {
      "content": "在程序中定义一函数 $digit(n,k)$,它能分离出整数 $n$ 从右边数第 $k$ 个数字。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2145"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "在程序中定义一函数 $digit(n,k)$,它能分离出整数 $n$ 从右边数第 $k$ 个数字。\n\n## Input\n\n正整数 $n$ 和 $k$。\n\n## Output\n\n一个数字。\n\n[samples]\n\n## Note\n\n$n \\le 10^9$。\n\n$k \\le 10$。...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments