文件名称:Pages

  • 所属分类:
  • Windows编程
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2013-03-26
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 陈*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

问题描述:一本书的页码从自然数1开始顺序编码直到自然数n。书的页码按照通常的习惯编排,每个页码都不含多余的前导数字0。例如,第6页用数字6表示,而不是06或006等。数字计数问题要求对给定书的总页码n,计算出书的全部页码中分别用到多少次数字0,1,2,…,9。

★算法设计:给定表示书的总页码的十进制整数n(1≤n≤109),计算书的全部页码中分别用到多少次数字0,1,2,…,9。

★数据输入:输入数据由文件名为input.txt的文本文件提供。每个文件只有1行,给出表示书的总页码的整数n。

★结果输出:将计算结果输出到文件output.txt。输出文件共有10行,在第k行输出页码中用到数字k-1的次数,k=1,2,…,10。-The descr iption of the problem: the page of a book from the natural numbers sequentially coding until the natural number n. The page number of the book in accordance with the usual custom layout each page does not contain a the excess leading digital 0. For example, the first six with a digital 6 shows, rather than 06 or 006. The digital counting problem requires calculated the total page number n of a given book, full folio books were used how many times the numbers 0, 1, 2, ..., 9. ★ algorithm design: given decimal integer n (1 ≤ n ≤ 109), said the total page number of the book Full Page calculations were used how many times the numbers 0, 1, 2, ..., 9. ★ Data Input: input data from a text file named input.txt file. Each file is only one line given the said book page number integer n. ★ output: the calculation results output to the file output.txt. The output file 10 lines in total, are used in the k-th row output page number of times of the digital k-1, k = 1,2, ..., 10.
(系统自动生成,下载前可以参看下载内容)

下载文件列表





Pages.cpp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org