分享
分享赚钱 收藏 举报 版权申诉 / 2

类型LEDDisplay.doc

  • 上传人:hwpkd79526
  • 文档编号:7468371
  • 上传时间:2019-05-19
  • 格式:DOC
  • 页数:2
  • 大小:33KB
  • 配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    LEDDisplay.doc
    资源描述:

    1、LED DisplayTime Limit:1 Second Memory Limit:32768 KBOne day in the laboratory, Fred found some LED displays. This seven-segment LED can display digit 0 to 9 properly. But Fred soon find the LED have a serious problem, at the beginning, the seven bars were all on. But when one bar once was trun off,

    2、it cant be turn on again! So ecah LED only can display digit in certain oder. For example, one LED can display 9,3,7 successively, but cant display 2,4.Now, Fred have a task to display a sequence of digit that is between 0 to 9. Because of the shortcoming of these LEDs, he need a number of them. But

    3、 he also want to minimize the number, can you help him?NOTE:If two digits in a sequece are the same,Fred want for the clearness, so he thought the latter digit cant be displayed on the same LED.Input:The input consists of several test cases. The first line of each test case contains a positive integ

    4、er N (=1000), then followed by a list of N digits. Each digit follows with a blank space.Output:For each test case, you must print a minimum number of LED that Fred need in one line.Sample Input:1849 0 7 388 8 8 9 6 5 4 1Sample Output:12 (Hint:one mothod is display 9,3 on the first LED; 0,7 on the s

    5、econd)3 (Hint:one possible solution is 8,8,9,4,1,8,6,5)Author:JIANG, Dongming大概意思:7 个 LED 为一组表示一个数字(如图) ,每个 LED 打开关闭一次就不能再打开了。现在要用最少的 LED 表示一串数字,比如:用 6 个 LED 可以表示“9” ,然后关掉一个 LED,可以表示“3” 。但是这时不能用这一组LED 表示“8” ,因为有一个 LED 被关掉过不能再打开了,要想表示“8”就必须另用一组LED。现在要表示“9073”这组数字,在第一个 LED 表示“9”和“3” ,在第二个 LED 表示“0”和“7” 。题目要求就是任意给一组数字,要求程序能判断最少需要多少组 LED。语言任意,运行时间少于1秒,内存少于32768 KB

    提示  道客多多所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:LEDDisplay.doc
    链接地址:https://www.docduoduo.com/p-7468371.html
    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    道客多多用户QQ群:832276834  微博官方号:道客多多官方   知乎号:道客多多

    Copyright© 2025 道客多多 docduoduo.com 网站版权所有世界地图

    经营许可证编号:粤ICP备2021046453号    营业执照商标

    1.png 2.png 3.png 4.png 5.png 6.png 7.png 8.png 9.png 10.png



    收起
    展开