FindBase

所属分类:图形图像处理
开发工具:C/C++
文件大小:185KB
下载次数:4
上传日期:2007-03-13 17:08:07
上 传 者duyankang
说明:  同一个数会由于采用不同的基数而使得其表现的形式是完全不一样的,在我们的学习中,我们熟悉的基数有10进制、12进制、60进制、2进制、8进制和16进制。比如数据12,如果我们用2进制表示,则它就是1100;如果用3进制表示就是110;如果用8进制表示则是14。我们的编程任务就是与数的进制(也就是基数)有关。 程序中我们会给大家很多个数对(假设每个数对的数用X和Y表示),程序需要解决的问题就是为X和Y各选择一个最小的基数,以使得这两个数在其选择的基数上是一对相等的数。 例如,12和5这个数对,我们可以为12选择基数3,为5选择基数6,这样一来12(base 3)=5(base 6),因为12(base 3)就是10进制数5,而5(base 6)也是10进制数中的5。 程序的输入是通过文件完成的。 文件中的每一行都包含一个数对X和Y,两个数通过一个或多个空格符分割,与X和Y相关联的有效基数值范围为2~36。X和Y的合理数值表示字符包括0—9和A-Z(表示数值10-35)。 文件的最后一行用一个数字0表示输入的结束。
(same number will be different because of the base and make its performance in the form of a completely different, In our study, we are familiar with the base 229 10, 229 12, 229 60, 229 2. 8-band 16-band. For example, 12 data, if we use the two-band said, it is 1100; If three-band said is 110; If eight 229 said it is 14. Our task is programming with a number of 229 (or base). We will process all of the many numbers (on the assumption that each number on the number of X-and Y said), procedures need to address the issue of the X and Y choose a minimum base, This makes two to a few in their chosen base is the equivalent of a few. For example, 12 and 5, the figure right, we will be able to choose 12 base 3 to 6 base 5 choice, This one to 12 (base 3) = 5 (base 6), because 12 (base 3) 229 10)

文件列表:
254933\Find Base\Find Base\Find Base.cpp (2233, 2006-08-18)
254933\Find Base\Find Base\Find Base.dsp (4322, 2006-08-18)
254933\Find Base\Find Base.dsw (553, 2006-08-18)
254933\Find Base\Find Base\base.in.txt (50, 2006-08-18)
254933\Find Base\Find Base\base.out.txt (190, 2006-08-21)
254933\Find Base\Find Base.ncb (41984, 2006-08-21)
254933\Find Base\Find Base.opt (48640, 2006-08-21)
254933\Find Base\Find Base\Find Base.plg (1340, 2006-08-18)
254933\Find Base\Find Base\Debug (0, 2006-08-20)
254933\Find Base\Find Base (0, 2006-08-18)
254933\Find Base\Debug (0, 2006-08-18)
254933\Find Base (0, 2006-08-21)
254933 (0, 2011-02-18)

近期下载者

相关文件


收藏者