數學問題 唔該幫手!! 救命ga! 10分!!

2008-05-25 5:26 pm
The Candy Factory Problem

The Richmond Candy Factory manufactures Apple Candy, and they want to be able to fill any demand for candy that ranges between 1 and 1000 pieces.
The production manager, a retired math teacher from the local high school, determined that they only needed 10 different size bags of candy on hand to be able to fill any order!

If all the bags are to hold a different amount of candy, and if you want to be able to fill any order of candy from 1 to 1000 pieces (without breaking any of the bags), how many pieces of candy should be put into each of the ten bags?

回答 (1)

2008-05-26 9:18 am
✔ 最佳答案
1,2,4,8,16,32,64,128,256,512

即是2的0次方 至到2的9次方共10種
這10個數字相加已可以組合出任何 1-1023的數

把10進數當2進數來算 便可以得出各數目的表達方式

例如 519 (十進制) = 1乘2^8+0乘2^7+0乘2^6+0乘2^5+0乘2^4+0乘2^3+1乘2^2+1乘2^1+1乘2^0
= 10000111 (二進制)

於是取出 1, 2, 4, 512 相加便可以得到519
參考: 電腦記數方式


收錄日期: 2021-04-13 15:36:25
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080525000051KK00561

檢視 Wayback Machine 備份