樱雪 发表于 2006-10-22 17:28

一个数学问题

一个布店卖布,布是49.36一米,账簿看不清楚了,卖了多少米不知道,只知道是整数,而且卖出的布的总额的前两个数也看不清了,只看到后面是7.28,问卖了几米布

╰☆渗蓝☆╮ 发表于 2006-10-22 19:19

8...........

穷的没早餐 发表于 2006-10-22 19:41

是正常的还是脑筋急转弯

墙角野猫 发表于 2006-10-22 21:31

<p>实在求不出</p>

“药粉”小梅 发表于 2006-10-22 21:57

不知道~头痛

墙角野猫 发表于 2006-10-22 22:02

两个数从10到99都试了都不行啊

zheng88jk 发表于 2006-10-22 22:25

一幢的人 发表于 2006-10-22 22:28

我连笔都找不到了。。。这种题也算不出

我是誰 发表于 2006-10-23 00:01

引用第0楼樱雪于2006-10-22 17:28发表的“一个数学问题”:
一个布店卖布,布是49.36一米,账簿看不清楚了,卖了多少米不知道,只知道是整数,而且卖出的布的总额的前两个数也看不清了,只看到后面是7.28,问卖了几米布

布价尾数为6,6只有与3及8乘能得到8,又因为总额只有前两个数看不清,那总额应小于1000,姑且从3到100之间来试吧:

      /// <summary>
      /// Here is the C# code to resolve this problem.
      /// </summary>
      static void Main(string[] args)
      {
      string totalMoney = "";
      for(int theLength=3;theLength<100;theLength+=5)
      {
         totalMoney = (theLength * 49.36).ToString();
         if ( totalMoney.EndsWith("7.28"))
         {
            Console.WriteLine("The length maybe is {0} meters,and the income is {1}", theLength, totalMoney);
         }
      }
      }


结果出来了,The length maybe is 98 meters,and the income is 4837.28
看来题目稍有点问题,总额小数点前不止三位。那么加大查找范围,在一千以内计算,结果为

The length maybe is 223 meters,and the income is 11007.28
The length maybe is 348 meters,and the income is 17177.28
The length maybe is 473 meters,and the income is 23347.28
The length maybe is 598 meters,and the income is 29517.28
The length maybe is 723 meters,and the income is 35687.28
The length maybe is 848 meters,and the income is 41857.28
The length maybe is 973 meters,and the income is 48027.28


回答完毕!
觉得算得好的,请送花吧,嘿嘿

中国台湾 发表于 2006-10-23 09:06

不会吧题目有问题你也算啊
页: [1] 2
查看完整版本: 一个数学问题