K-wolf Number

TimeLimit:3000MS  MemoryLimit:65536KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
Alice thinks an integer x is a K-wolf number, if every K adjacent digits in decimal representation of x is pairwised different.
Given (L,R,K), please count how many K-wolf numbers in range of [L,R].
Input
The input contains multiple test cases. There are about 10 test cases.

Each test case contains three integers L, R and K.

$1 \leq L \leq R \leq 1e18$
$2 \leq K \leq 5$
Output
For each test case output a line contains an integer.
SampleInput
1 1 2
20 100 5
SampleOutput
1
72
Submit
题目统计信息详细
总AC数4
通过人数4
尝试人数5
总提交量6
AC率66.67%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: