Problem4394--卡片

4394: 卡片

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

本题为填空题,只需要算出结果后,在代码中使用输出语句将所填结果输出即可。

小蓝有很多数字卡片,每张卡片上都是数字 lns="http://www.w3.org/1998/Math/MathML">0 到 lns="http://www.w3.org/1998/Math/MathML">9

小蓝准备用这些卡片来拼一些数,他想从 lns="http://www.w3.org/1998/Math/MathML">1 开始拼出正整数,每拼一个,就保存起来,卡片就不能用来拼其它数了。

小蓝想知道自己能从 lns="http://www.w3.org/1998/Math/MathML">1 拼到多少。

例如,当小蓝有 lns="http://www.w3.org/1998/Math/MathML">30 张卡片,其中 lns="http://www.w3.org/1998/Math/MathML">0 到 lns="http://www.w3.org/1998/Math/MathML">9 各 lns="http://www.w3.org/1998/Math/MathML">3 张,则小蓝可以拼出 lns="http://www.w3.org/1998/Math/MathML">1 到 lns="http://www.w3.org/1998/Math/MathML">10

但是拼 lns="http://www.w3.org/1998/Math/MathML">11 时卡片 lns="http://www.w3.org/1998/Math/MathML">1 已经只有一张了,不够拼出 lns="http://www.w3.org/1998/Math/MathML">11

现在小蓝手里有 lns="http://www.w3.org/1998/Math/MathML">0 到 lns="http://www.w3.org/1998/Math/MathML">9 的卡片各 lns="http://www.w3.org/1998/Math/MathML">2021 张,共 lns="http://www.w3.org/1998/Math/MathML">20210 张,请问小蓝可以从 lns="http://www.w3.org/1998/Math/MathML">1 拼到多少?

提示:建议使用计算机编程解决问题。

运行限制

  • 最大运行时间:1s
  • 最大运行内存: 128M

Source/Category