返回列表 发帖

这道推理题怎么做呢?


A teacher says: I'm thinking of two natural numbers bigger than 1. Try to guess what they are.

The first student knows their product(乘积) and the other one knows their sum.

First: I do not know the sum.

Second: I knew that. The sum is less than 14.

First: I knew that. However, now I know the numbers.

Second: And so do I.

What were the numbers?

哈哈 看来我是第一了

答案应该是   暂时还不知道

[ 本帖最后由 vistafans 于 2007-8-26 22:56 编辑 ]

TOP

不对~~~~~~~~

TOP

They are 3 and 4.  

TOP

原帖由 vistafans 于 2007-8-26 13:42 发表 http://bbs.ioage.com/cn/images/common/back.gif
哈哈 看来我是第一了

答案应该是 4和8  对不?




[ 本帖最后由 xmxiaolu 于 2007-8-26 19:48 编辑 ]
弓鞋绣菊朝朝踏露蕊未开

圆扇画梅日日摇风花不落

TOP

The condition is:
x,y∈n
1<n<14
x>1
y>1
x+y<14
x*y≠3,5,7,9,11,13
x+y≠x*y
弓鞋绣菊朝朝踏露蕊未开

圆扇画梅日日摇风花不落

TOP

First: I knew that. However, now I know the numbers.
这句话什么意思,I knew that,注意knew是过去式,那么First说的是他knew什么呢?

TOP

#include <iostream>
using namespace std;
int multiplication(int x,int y)
{
        int n=x*y;
        int i,j;
        for(i=2;i<12;i++)
        {
                for(j=2;j<12;j++)
                        if((n==i*j)&&(i+j<14))
                        {
                                if((x!=i && y!=j)&&(x!=j && y!=i))
                                        return 1;
                        }
        }               
        return 0;       
}
void main()
{
        int x,y;
        for(x=2;x<12;x++)
        {
                for(y=2;y<12;y++)
                {
                        if(multiplication(x,y))
                        {
                                if((x+y<14)&&((x*y)!=(x+y)))
                                {
                                        cout<<"x="<<x<<endl
                                                <<"y="<<y<<endl;
                                        cout<<"The end!"<<endl;
                                }
                        }
                }
        }
        return;
}

[ 本帖最后由 xmxiaolu 于 2007-8-26 23:10 编辑 ]
弓鞋绣菊朝朝踏露蕊未开

圆扇画梅日日摇风花不落

TOP

x=2,2,2,2,,,3,3,3,3,,,4,4,4,4,5,5,5,6,6,6,6,8,8,8,9,9,10,10
y=6,8,9,10,4,6,8,10,4,5,6,9,4,6,8,2,4,5,6,2,3,5,2,4,,2,,3
弓鞋绣菊朝朝踏露蕊未开

圆扇画梅日日摇风花不落

TOP

不研究,叫wany来

TOP

条件没有利用完整,所以出了很多错误的答案,正确的答案应该只有一个才对~

TOP

原帖由 xmxiaolu 于 2007-8-26 21:25 发表 http://bbs.ioage.com/cn/images/common/back.gif
x=2,2,2,2,,,3,3,3,3,,,4,4,4,4,5,5,5,6,6,6,6,8,8,8,9,9,10,10
y=6,8,9,10,4,6,8,10,4,5,6,9,4,6,8,2,4,5,6,2,3,5,2,4,,2,,3


太离谱了吧

TOP

返回列表