Coder confusions, starting with an interview question (downmoon)

Source: Internet
Author: User

Yesterday, I saw a post by Dai zhenjun, "Please do not contract in the project or product" shell ".

I am really touched, especially touched, and even think of the story of the West Ling Wang mask in the TV series "Youth Bao Qingtian III-tian Mang Legend": the mask has been worn for a long time, it cannot be extracted any more.
Once upon a time, when coder was just getting into work, coder was so angry that he dared to change the power of his new day, so that countless Onlookers were excited or even excited !............

Slowly,
It may have been a long time to stay in the shell, so that the current world is almost confused. "-- Dai zhenjun language), because of the environment, it can also be said to be a grinding worker, a lot of enthusiasm is no longer guaranteed
The new ideas that have been adhered to and arranged have not been noticed, and rooted in the roots. After 35 years, most people are in danger. Looking at the high-level faces, they have to watch out for future generations to catch up. Some cool people either transform to management or
If you have started your own business, you can simply sell your experience as a lecturer. Therefore, at this stage of normal experience and wisdom (years old), it can be said that the mountains and rivers are broken, and of course, a very small number of outstanding people stick to it.
Money and equity guarantee), even if the body does not support strong fall, you can also fall into a "yellow mud to grind dust, only the incense like this.
Leave the question! If the college entrance examination is over, let's get started,

Interview Questions,
A person spent 8 yuan to buy a chicken and 9 yuan to sell it. Then he thought it was not worthwhile. He bought 10 yuan and sold 11 yuan to another person. Ask him what the final benefit is?


Tip: this is an interview question for a famous foreign commercial company. It is not about your mathematical computation, but about whether you will put "how to get the maximum profit" in the economy, it also tests whether you can determine your position in the complicated transaction process. It is said that this question has been tested by thousands of people, and the accuracy rate is less than 5%. Think carefully and answer it carefully!
In order not to disturb everyone's brains, you can refer to the answer after the text. We can tell you that it is definitely not 2 RMB ..


 
Here, I would like to say: why are so many people wrong? Are they not smart enough? Maybe not? I believe that experience and inertial thinking have bound most people's activities, physical non-physical. In other words
After a long time for the same or one type of things, people's thinking will naturally be finalized! This is probably the same principle. Therefore, we have to find a way to stimulate the nerves that have been numb for a long time, and then study, high-quality expansion training, and so on.
There are many ways to do this. As a me from Zhejiang University, I still have some experience. Please read my article.
March 25, unforgettable days-Thoughts on me expansion in Zhejiang University-downmoon


Excerpt:

"
In fact, as the coach said, each of us has our own "comfort zone" in our hearts. We all want to "relay" and don't want to leave here, the purpose of this project is to show us how to overcome our fear and adjust our mentality,

Identify the goals that really matter and touch you
,And then persistently pursue with love and faith,
Defeat another one,In the end, you can get what you want.
This reminds me of a story:

  
E is the longest-lived bird in the world and can survive for 70 years. But in order to live to this age, it will face a severe and difficult situation when it is 40 years old.
. At the age of 40, the e's claws were no longer sharp and agile, and even failed to capture prey. The sharp beam grew and bent and almost bent to touch the feathers on his chest; wings are calcium due to age
And become very heavy, heavy feathers also make it no longer flexible, flying at this time has become very difficult for the e.


At this time, e has only two options: either to die, or to experience a 150-day
Painful changes. If you select the latter, it must fly to the top of a very high mountain where it inhabits, find a rock nest, and temporarily stop flying. After stopping, The e will use the aging beam to beat the rock until the beam is completely
Off! After the new beam grows out, the e will use the new beam to pull out the aging nails on the claw one by one. After the new nails grow out, it will remove the calcification feathers one by one. Five months later, e started again.
After its transformation, it has gained 30 years of life.



In our lives, we often need to wait for a moment to begin a transformation process. In order to continue a successful life, we must put away some habits and memories. Only by putting down the heavy burdens of the past can we enjoy the new life brought about by transformation ......" -- Monthly invitation



From the heart, it is declared in the name of 70 yards, not an advertisement.

There are other similar problems. Let the readers share their thoughts with each other. Haha. Do not blurt out the answer.

One day, a young man came to Boss Wang.
The store bought a gift.

,



This
The cost of a gift is 18 yuan, and the price is 21 yuan. The result is that the young man paid 100 yuan for the gift. Boss Wang had no change at the time. He used the 100 yuan to change the 100 yuan change to the neighborhood.
79 yuan. However, the block found that the 100 yuan was a fake banknote, and Boss Wang had no choice but to pay the block 100 yuan. Now the question is: How much has Boss Wang lost in this transaction ???


Answers to the questions:

Code

Answer: two yuan is negative, that is, two yuan is lost.



The first thing to note is that the value of a commodity changes during the exchange process. Here we need to consider the cost accounting problem, that is, the cost of chicken is not static.

(I) For the first 8 yuan purchase, the cost of chicken is 8 yuan for him (or the person who wants to trade with him later. Then I sold it for 9 yuan. At this time, I earned 1 yuan. Obviously, there is no doubt.

(Ii) Please note that the next sentence is the key: the guy who bought the chicken (we call it B) spent 9 yuan to buy the chicken, so now for B (and for those who want to trade with B in the future), the cost of chicken is 9 yuan, for example, the same start person (we call it a good) when you buy a chicken for 8 yuan, the cost of the chicken is 8 yuan.

(Iii) at this moment, a bought the 9-yuan chicken from B for 10 yuan. If we think from B's perspective, B sold the chicken he bought for 9 yuan for 10 yuan. B earned 1 yuan, which is a's loss of 1 yuan.

(Iv) now the chicken in the hand of a is bought for 10 yuan, so for a (and for those who will trade with a later ), the cost of chicken rose to 10 yuan.

(V) In the end, a sold the chicken with a cost of 10 yuan to another person (called C) for 11 yuan, which is the same as (I, I earned 1 RMB.

Next, let's summarize: (I) when I earn 1 yuan, + 1; (iii) when I lose 1 yuan,-1; (v) When I earn 1 yuan, + 1. Total + 1-1 + 1 = 1 RMB.

So it can be said that this guy a's head is in the water, (I) has already earned 1 yuan, and steps (ii) to (v) are not efficient.



The answer to this question in the test is that the profit is RMB 2, which must be the failure of the interview;

The answer to 3 yuan is even more incredible, because I don't even know when to add the cost, and it is certainly a failure;

Congratulations! You are not in the field of head water.


Me
We can see that the chicken is in the C hand and he spent 11 yuan to buy it, that is, the cost of the chicken has risen to 11 yuan. In the first place, if a sold a chicken whose cost was 8 yuan in his hand to C for 11 yuan
The current situation is reached (the cost of chicken in C is 11 yuan). That is to say, a's instinct is to earn 3 yuan, and now only 1 yuan, so in the whole process, a actually lost 2 yuan (that is to say, I didn't get the expected
Profit is also a disguised loss ).


If someone doesn't understand, I will explain where the two yuan loss is.


The following table lists the income and expenditure of the three ABC members:


A, 8, 9, 10, and 11

B N/A 9 branch 10 accept N/

C n/? 11


For example
If the preceding steps (I) to (v) are not executed, but are directly sold to C, then, only the transactions of A's "8-11 receipts" and C's "11 receipts" (The Blue section in the Table above) occur, the other income and expenditure conditions are large.
Surplus (the red part in the above table) is the loss of a caused by these redundant transactions: If a direct AC transaction is made, B is not involved in the transaction (B should balance the income and expenditure ), but the fact is that B earned 1 yuan.
(B receives 9 RMB and 10 RMB), and the RMB 1 is a loss. If an AC transaction is made directly, A does not need to buy the 9 yuan sold from B for another 10 yuan (a 9 for 10 yuan ).
You have to pay your own bill for $1. From this we can see that a is a loss of 2 yuan.


Some people may have doubts: If there is no transaction from step (I) to (v), the chicken cost will not rise to 11 yuan, there is no "3 yuan" concept.


This
The idea is wrong. When B and C buy a chicken, they don't know the original cost of the chicken. They think that 9 yuan (B) and 11 yuan (c) it is cost-effective to buy the chicken, or even if they know the cost of the chicken
Willing to purchase at this price. So if a finds C directly, he can sell the chicken to him for 11 yuan. C doesn't care how much money a buys the chicken. He only cares about his bid, just as you can see that you want to buy the desired product
Will the merchant be concerned about how much it earned? You must just think, "Well, I can accept the price. Buy it ". Therefore, C will buy the chicken for 11 yuan, which has nothing to do with a's transaction with B. It's his
Human behavior. That is to say, even if there is no step (I) to (v), as long as C buys the chicken, the cost of the chicken will rise to 11 yuan, "A should earn 3 yuan.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.