<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>求从1到n中1出现的次数 - 四号程序员</title>
	<atom:link href="https://www.coder4.com/archives/tag/%E6%B1%82%E4%BB%8E1%E5%88%B0n%E4%B8%AD1%E5%87%BA%E7%8E%B0%E7%9A%84%E6%AC%A1%E6%95%B0/feed" rel="self" type="application/rss+xml" />
	<link>https://www.coder4.com</link>
	<description>Keep It Simple and Stupid</description>
	<lastBuildDate>Wed, 06 Jun 2012 04:18:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>求从1到n中1出现的次数</title>
		<link>https://www.coder4.com/archives/3366</link>
					<comments>https://www.coder4.com/archives/3366#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Tue, 05 Jun 2012 14:43:17 +0000</pubDate>
				<category><![CDATA[算法&数据结构]]></category>
		<category><![CDATA[求从1到n中1出现的次数]]></category>
		<category><![CDATA[面试]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=3366</guid>

					<description><![CDATA[题目：输入一个整数n，求从1到n这n个整数的十进制表示中1出现的次数。 例如输入12，从1到12这些整数中包含1 的数字有1，10，11和12，1一共出现了5次。 编程之美上的原题。 基本思路1： 每次判断各位是否为1，计数。然后依次/=10即可。 时间复杂度O(N*lgN) #include &#60;stdio.h&#62; int countone(int num) { int cnt = 0; while(num) { if(num%[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/3366/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
