Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
今天遇到的一道笔试题
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  21 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mingliang ZHU  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 9:59 am
From: Mingliang ZHU <mingliang....@gmail.com>
Date: Sat, 31 Oct 2009 21:59:58 +0800
Local: Sat, Oct 31 2009 9:59 am
Subject: [TL] 今天遇到的一道笔试题

int Test(int i)
{
    int Res = 0;
    while(i != 1)
    {
        ++Res;
        if(i % 2 == 0)
            i /= 2;
        else
            i = i * 3 + 1;
    }
    return Res;

}

求 Test(125) 的值。

初看还以为跟二进制啥的有关,不过推了一下完全没头绪。
回来跑了一把知道结果是 108
总时间很充足,数学非常照的估计可以在10多分钟内算出来?

当然原题是选择题,选项有:
A. 90(好象是) B. 108  C. 125  D. 死循环
所以有排除法的思路也可以~~

Best wishes,
Mingliang ZHU


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
安帛伟  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 10:40 am
From: 安帛伟 <abw...@gmail.com>
Date: Sat, 31 Oct 2009 22:40:56 +0800
Local: Sat, Oct 31 2009 10:40 am
Subject: Re: [TL] 今天遇到的一道笔试题

如下108次,貌似没啥规律:
376 188 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206
103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336
668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438
719 2158 1079
3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232
4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23
70 35 106 53 160 80 40 20 10 5 16 8 4 2 1

2009/10/31 Mingliang ZHU <mingliang....@gmail.com>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shuo Chen  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 11:35 am
From: Shuo Chen <giantc...@gmail.com>
Date: Sat, 31 Oct 2009 08:35:40 -0700 (PDT)
Local: Sat, Oct 31 2009 11:35 am
Subject: Re: 今天遇到的一道笔试题
角谷猜想。笔试遇到就硬算吧。

On Oct 31, 9:59 pm, Mingliang ZHU <mingliang....@gmail.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
安帛伟  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 11:47 am
From: 安帛伟 <abw...@gmail.com>
Date: Sat, 31 Oct 2009 23:47:19 +0800
Local: Sat, Oct 31 2009 11:47 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

如果知道是角谷猜想,至少可以排除选项D。

2009/10/31 Shuo Chen <giantc...@gmail.com>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lucas Zhang  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 11:51 am
From: Lucas Zhang <zhangqing1...@gmail.com>
Date: Sat, 31 Oct 2009 23:51:56 +0800
Local: Sat, Oct 31 2009 11:51 am
Subject: Re: [TL] 今天遇到的一道笔试题

这可是传说中的数学难题啊[?]
不过可以变成这个样子:

                while(1)
                {
                        if(i%2==1)
                        { i = (3*i+1)>>1; Res += 2;}
                        else
                        { i = i>>1; ++Res;}
                }

这样应该可以算得快一些~

2009/10/31 Mingliang ZHU <mingliang....@gmail.com>

--
=============
Thank you
Zhang Qing

  32B.gif
< 1K Download

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lucas Zhang  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 11:53 am
From: Lucas Zhang <zhangqing1...@gmail.com>
Date: Sat, 31 Oct 2009 23:53:21 +0800
Local: Sat, Oct 31 2009 11:53 am
Subject: Re: [TL] 今天遇到的一道笔试题

应该是while(i != 1)

                while( i != 1 )
                {
                        if(i%2==1)

                        { i = (3*i+1)>>1; Res += 2;}

                        else
                        { i = i>>1; ++Res;}
                }

2009/10/31 Lucas Zhang <zhangqing1...@gmail.com>

--
=============
Thank you
Zhang Qing

  32B.gif
< 1K Download

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
guihua wu  
View profile   Translate to Translated (View Original)
 More options Oct 31 2009, 10:28 am
From: guihua wu <guihuawu8...@gmail.com>
Date: Sat, 31 Oct 2009 22:28:44 +0800
Local: Sat, Oct 31 2009 10:28 am
Subject: Re: [TL] 今天遇到的一道笔试题

你今天参加的是vmware的吧
那个学校滴啊?

2009/10/31 Mingliang ZHU <mingliang....@gmail.com>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mingliang ZHU  
View profile   Translate to Translated (View Original)
 More options Nov 1 2009, 12:20 am
From: Mingliang ZHU <mingliang....@gmail.com>
Date: Sun, 1 Nov 2009 12:20:54 +0800
Local: Sun, Nov 1 2009 12:20 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题
Orz,那还是认栽了
以后知道了,猜个中不溜到答案还是靠谱的~~

不过这家比较bt,选择题猜错了得倒扣分……

Best wishes,
Mingliang ZHU

2009/10/31 Shuo Chen <giantc...@gmail.com>:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mingliang ZHU  
View profile   Translate to Translated (View Original)
 More options Nov 1 2009, 12:21 am
From: Mingliang ZHU <mingliang....@gmail.com>
Date: Sun, 1 Nov 2009 12:21:40 +0800
Local: Sun, Nov 1 2009 12:21 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题
中科院
你呢?今天emc去不?

Best wishes,
Mingliang ZHU

2009/10/31 guihua wu <guihuawu8...@gmail.com>:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
guihua wu  
View profile   Translate to Translated (View Original)
 More options Nov 1 2009, 4:10 am
From: guihua wu <guihuawu8...@gmail.com>
Date: Sun, 1 Nov 2009 17:10:50 +0800
Local: Sun, Nov 1 2009 4:10 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

emc一样变态的题,不去了,西电滴

2009/11/1 Mingliang ZHU <mingliang....@gmail.com>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Li Yang  
View profile   Translate to Translated (View Original)
 More options Nov 1 2009, 10:56 am
From: Li Yang <myice...@gmail.com>
Date: Sun, 1 Nov 2009 23:56:59 +0800
Local: Sun, Nov 1 2009 10:56 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

我想知道这种只能计算的问题到底考的对方什么呢?
难道是 在时间有限的情况下对考题的取舍能力?
2009/10/31 Lucas Zhang <zhangqing1...@gmail.com>

--
While(!success=try())

  32B.gif
< 1K Download

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lucas Zhang  
View profile   Translate to Translated (View Original)
 More options Nov 1 2009, 11:16 pm
From: Lucas Zhang <zhangqing1...@gmail.com>
Date: Mon, 2 Nov 2009 12:16:27 +0800
Local: Sun, Nov 1 2009 11:16 pm
Subject: Re: [TL] Re: 今天遇到的一道笔试题

测试忍耐度...

2009/11/1 Li Yang <myice...@gmail.com>

--
=============
Thank you
Zhang Qing

  32B.gif
< 1K Download

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
halida  
View profile   Translate to Translated (View Original)
 More options Nov 3 2009, 8:09 am
From: halida <linjunhal...@gmail.com>
Date: Tue, 3 Nov 2009 05:09:21 -0800 (PST)
Local: Tues, Nov 3 2009 8:09 am
Subject: Re: 今天遇到的一道笔试题
这种题是为了让平均分变低,好筛出天才出来。

On Nov 2, 12:16 pm, Lucas Zhang <zhangqing1...@gmail.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris#24  
View profile   Translate to Translated (View Original)
 More options Nov 3 2009, 9:52 am
From: "Chris#24" <superlinech...@gmail.com>
Date: Tue, 3 Nov 2009 06:52:26 -0800 (PST)
Local: Tues, Nov 3 2009 9:52 am
Subject: Re: 今天遇到的一道笔试题
应该是考察面对问题时的思考方式和知识面吧
如果你能说出是角谷猜想,应该是很加分的

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
谢铸聪  
View profile   Translate to Translated (View Original)
 More options Nov 3 2009, 9:09 am
From: 谢铸聪 <zhucong...@gmail.com>
Date: Tue, 3 Nov 2009 22:09:52 +0800
Local: Tues, Nov 3 2009 9:09 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

貌似PKU上面有一道题类似这个。。。


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Moses  
View profile   Translate to Translated (View Original)
 More options Nov 4 2009, 1:30 am
From: Moses <lx0...@gmail.com>
Date: Wed, 4 Nov 2009 14:30:08 +0800
Local: Wed, Nov 4 2009 1:30 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

有没有可能出现死循环呢?

2009/11/3 谢铸聪 <zhucong...@gmail.com>

> 貌似PKU上面有一道题类似这个。。。

--
       此致
                               敬礼

--

----------------------------
泠泠七弦上,静听松风寒。
http://www.liuxuan.net
moses
-----------------------------


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
WindyWinter  
View profile   Translate to Translated (View Original)
 More options Nov 4 2009, 2:03 am
From: WindyWinter <bsl...@gmail.com>
Date: Wed, 4 Nov 2009 15:03:47 +0800
Local: Wed, Nov 4 2009 2:03 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

这个是角谷猜想,猜想的内容是不会出现死循环。目前也没发现出现死循环的数字。
Soli Deo gloria,
yours WindyWinter
and http://www.briefdream.com

2009/11/4 Moses <lx0...@gmail.com>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jun lin  
View profile   Translate to Translated (View Original)
 More options Nov 4 2009, 4:09 am
From: jun lin <linjunhal...@gmail.com>
Date: Wed, 4 Nov 2009 17:09:46 +0800
Local: Wed, Nov 4 2009 4:09 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

猜想。。。应该还没有被证明的吧。

2009/11/4 WindyWinter <bsl...@gmail.com>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Moses  
View profile   Translate to Translated (View Original)
 More options Nov 4 2009, 4:01 am
From: Moses <lx0...@gmail.com>
Date: Wed, 4 Nov 2009 17:01:52 +0800
Local: Wed, Nov 4 2009 4:01 am
Subject: Re: [TL] Re: 今天遇到的一道笔试题

谢谢!

2009/11/4 WindyWinter <bsl...@gmail.com>

--
       此致
                               敬礼

--

----------------------------
泠泠七弦上,静听松风寒。
http://www.liuxuan.net
moses
-----------------------------


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
line head  
View profile   Translate to Translated (View Original)
 More options Nov 5 2009, 9:11 pm
From: line head <luckheadl...@gmail.com>
Date: Fri, 6 Nov 2009 10:11:04 +0800
Local: Thurs, Nov 5 2009 9:11 pm
Subject: Re: [TL] Re: 今天遇到的一道笔试题
我记得编程珠玑里有道练习题就是这个类似的。有趣的是后面的习题解答说如果你做出来,请找最近的数学学院申请博士来着

2009/11/4 Moses <lx0...@gmail.com>:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lucas Zhang  
View profile   Translate to Translated (View Original)
 More options Nov 5 2009, 10:18 pm
From: Lucas Zhang <zhangqing1...@gmail.com>
Date: Fri, 6 Nov 2009 11:18:37 +0800
Local: Thurs, Nov 5 2009 10:18 pm
Subject: Re: [TL] Re: 今天遇到的一道笔试题

所以我觉得读编程珠玑是一种享受 读多少遍都不会觉得腻[?]
2009/11/6 line head <luckheadl...@gmail.com>

--
=============
Thank you
Zhang Qing

  32B.gif
< 1K Download

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google