文件名称:cshixian
介绍说明--下载内容均来自于网络,请自行研究使用
问题描述:6×9=42对于十进制来说是错误的,但是对于十三进制来说是正确的。即6(13)×9(13)=42(13),而42(13)=54(10)。你的任务是写一个程序读入3个整数p、q、r,然后确定一个进制B(2<=B<=16)使得p×q=r。如果B有很多选择,输出最小的一个。例如:p=11,q==11,r=121。则有11(3)×11(3)=121(3),因为11(3)=4(10)和121(3)=16(10)。这种情况下,应该输出3。如果没有合适的进制,则输出0.
-Problem Descr iption: 6 × 9 = 42 for the metric system is wrong, but 13 M is correct. That is, 6 (13) × 9 (13) = 42 (13), while 42 (13) = 54 (10). Your task is to write a program to read three integers p, q, r, and then to identify a band B (2 <= B <= 16) makes p × q = r. If B have many choices, output the smallest one. For example: p = 11, q == 11, r = 121. There are 11 (3) × 11 (3) = 121 (3), because 11 (3) = 4 (10) and 121 (3) = 16 (10). Under the circumstances, should the output 3. If there are no suitable notation, then output 0.
-Problem Descr iption: 6 × 9 = 42 for the metric system is wrong, but 13 M is correct. That is, 6 (13) × 9 (13) = 42 (13), while 42 (13) = 54 (10). Your task is to write a program to read three integers p, q, r, and then to identify a band B (2 <= B <= 16) makes p × q = r. If B have many choices, output the smallest one. For example: p = 11, q == 11, r = 121. There are 11 (3) × 11 (3) = 121 (3), because 11 (3) = 4 (10) and 121 (3) = 16 (10). Under the circumstances, should the output 3. If there are no suitable notation, then output 0.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cshixian.txt