<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 一个农夫买鸡的编程面试题</title>
	<atom:link href="http://www.mianwww.com/html/2009/12/6644.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mianwww.com/html/2009/12/6644.html</link>
	<description></description>
	<lastBuildDate>Thu, 09 Feb 2012 01:00:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: 这题太傻了</title>
		<link>http://www.mianwww.com/html/2009/12/6644.html/comment-page-1#comment-4629</link>
		<dc:creator>这题太傻了</dc:creator>
		<pubDate>Mon, 22 Nov 2010 05:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mianwww.com/?p=6644#comment-4629</guid>
		<description>RT</description>
		<content:encoded><![CDATA[<p>RT</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soha</title>
		<link>http://www.mianwww.com/html/2009/12/6644.html/comment-page-1#comment-4083</link>
		<dc:creator>soha</dc:creator>
		<pubDate>Thu, 05 Aug 2010 12:03:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mianwww.com/?p=6644#comment-4083</guid>
		<description>int x = 0 ,y = 0, z = 0;
for(;x &lt; 100; x++){
   for(;y &lt; 100; y++){
	if((7*x + 4*y == 100)){
	   z = 6*x + 3*y;
           System.out.println(&quot;公鸡：&quot; + x+ &quot;只，母鸡：&quot; + y+ &quot;只，小鸡：&quot; + z + &quot;只&quot;);
	}
   }
}</description>
		<content:encoded><![CDATA[<p>int x = 0 ,y = 0, z = 0;<br />
for(;x &lt; 100; x++){<br />
   for(;y &lt; 100; y++){<br />
	if((7*x + 4*y == 100)){<br />
	   z = 6*x + 3*y;<br />
           System.out.println(&quot;公鸡：&quot; + x+ &quot;只，母鸡：&quot; + y+ &quot;只，小鸡：&quot; + z + &quot;只&quot;);<br />
	}<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin</title>
		<link>http://www.mianwww.com/html/2009/12/6644.html/comment-page-1#comment-3850</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Fri, 21 May 2010 00:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mianwww.com/?p=6644#comment-3850</guid>
		<description>for(int a1 = 3; a1 &lt; 100; a1 += 3 ){
			for(int a2 = 1; a2 &lt; (100 - a1 / 3) / 5; a2++){
				int a3 = (100 - a1 / 3 - a2 * 5) / 3;
				int temp = (100 - a1 / 3 - a2 * 5) % 3;
				if(temp == 0 &amp;&amp; a1 + a2 + a3 == 100){
					System.out.println(&quot;公鸡：&quot; + a2 + &quot;只，母鸡：&quot; + a3 + &quot;只，小鸡：&quot; + a1 + &quot;只&quot;);
				}
			}
		}</description>
		<content:encoded><![CDATA[<p>for(int a1 = 3; a1 &lt; 100; a1 += 3 ){<br />
			for(int a2 = 1; a2 &lt; (100 &#8211; a1 / 3) / 5; a2++){<br />
				int a3 = (100 &#8211; a1 / 3 &#8211; a2 * 5) / 3;<br />
				int temp = (100 &#8211; a1 / 3 &#8211; a2 * 5) % 3;<br />
				if(temp == 0 &amp;&amp; a1 + a2 + a3 == 100){<br />
					System.out.println(&quot;公鸡：&quot; + a2 + &quot;只，母鸡：&quot; + a3 + &quot;只，小鸡：&quot; + a1 + &quot;只&quot;);<br />
				}<br />
			}<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小菜鸟</title>
		<link>http://www.mianwww.com/html/2009/12/6644.html/comment-page-1#comment-3202</link>
		<dc:creator>小菜鸟</dc:creator>
		<pubDate>Thu, 04 Mar 2010 09:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.mianwww.com/?p=6644#comment-3202</guid>
		<description>因为小鸡肯定要小于100的 一共就100只鸡  浪费了一个条件吧？</description>
		<content:encoded><![CDATA[<p>因为小鸡肯定要小于100的 一共就100只鸡  浪费了一个条件吧？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: study</title>
		<link>http://www.mianwww.com/html/2009/12/6644.html/comment-page-1#comment-2581</link>
		<dc:creator>study</dc:creator>
		<pubDate>Wed, 06 Jan 2010 09:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mianwww.com/?p=6644#comment-2581</guid>
		<description>为啥运行时  小鸡排前面就不能得出第一个和第二个的结果呀，是不是我哪里计算错了呀
           //顺序是：公鸡、母鸡、小鸡
           for(int a1=1;a1&lt;20;a1++){
            for(int a2=1;a2&lt;(100-(a1*5))/3;a2++){
            int a3 = (100-5*a1-3*a2)*3;
            if(a1+a2+a3==100)
            System.out.println(&quot;公鸡：&quot;+a1+&quot;只，母鸡：&quot;+a2+&quot;只，小鸡：&quot;+a3+&quot;只&quot;);
            }
            }
           
//  顺序是：母鸡、公鸡、小鸡
            for(int aa1=1;aa1&lt;100/3;aa1++)
            {
               for(int aa2=1;aa2aa1=&quot; + aa1 + &quot;只 aa2=&quot; + aa2
                               + &quot;只 aa3=&quot; + aa3 +&quot;只&quot;);
                   }
               } 
            }
            //********************************为啥小鸡排在前面就不行了！*********************************************
             // 顺序是： 小鸡、母鸡、公鸡、     
            for(int aaa1=1;aaa1&lt;100;aaa1++)
            {
               for(int aaa2=1;aaa2aaa1=&quot; + aaa1 + &quot;只 aaa2=&quot; + aaa2
                               + &quot;只 aaa3=&quot; + aaa3 +&quot;只&quot;);
                   }
               } 
            }</description>
		<content:encoded><![CDATA[<p>为啥运行时  小鸡排前面就不能得出第一个和第二个的结果呀，是不是我哪里计算错了呀<br />
           //顺序是：公鸡、母鸡、小鸡<br />
           for(int a1=1;a1&lt;20;a1++){<br />
            for(int a2=1;a2&lt;(100-(a1*5))/3;a2++){<br />
            int a3 = (100-5*a1-3*a2)*3;<br />
            if(a1+a2+a3==100)<br />
            System.out.println(&quot;公鸡：&quot;+a1+&quot;只，母鸡：&quot;+a2+&quot;只，小鸡：&quot;+a3+&quot;只&quot;);<br />
            }<br />
            }</p>
<p>//  顺序是：母鸡、公鸡、小鸡<br />
            for(int aa1=1;aa1&lt;100/3;aa1++)<br />
            {<br />
               for(int aa2=1;aa2aa1=&#8221; + aa1 + &#8220;只 aa2=&#8221; + aa2<br />
                               + &#8220;只 aa3=&#8221; + aa3 +&#8221;只&#8221;);<br />
                   }<br />
               }<br />
            }<br />
            //********************************为啥小鸡排在前面就不行了！*********************************************<br />
             // 顺序是： 小鸡、母鸡、公鸡、<br />
            for(int aaa1=1;aaa1&lt;100;aaa1++)<br />
            {<br />
               for(int aaa2=1;aaa2aaa1=&#8221; + aaa1 + &#8220;只 aaa2=&#8221; + aaa2<br />
                               + &#8220;只 aaa3=&#8221; + aaa3 +&#8221;只&#8221;);<br />
                   }<br />
               }<br />
            }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

