One, a monthly salary of tens of thousands of net developers problem
There was a troop length of 100 meters, a uniform advance, a runner with a constant speed from the team head movement to the team tail, then returned the team head, in which the troops marched 100 meters, asking the runner the distance of the movement.
Suppose it took 100 seconds, and the team's speed was 1; V for the runner speed, the distance from the runner to the tail of the team is S.
Then a total of M + 2 * S is gone.
---------------------------
The Herald goes to S, then the troops walk 100-s, the Herald to the tail.
Go forward, the distance for 100+s, and the troops just walked 100-s, then when walking 100-(100-s) = S
Same time.
Then there are
S/(100+s) = (100-s)/s
=> s^2 = 10000-s^2
=> s^2 = 5000;
=> S = 70.71067811865475244008443621049
=>close
The root function is available in the math namespace.
You can also iterate over them.
Second, monthly salary 50,000, Microsoft China Research Institute of the latest questions
Xiaoming and Xiao Qiang are all teacher Zhang's students, Zhang teacher's birthday is M month n days, 2 people know Zhang Teacher's birthday is the following 10 group of one day, Zhang teacher told the M value of Xiao Ming, the N value told the small, Zhang teacher asked them know his birthday is that day?
March 4 March 5 March 8
June 4 June 7
September 1 September 5
December 1 December 2 December 8
Xiaoming said: "If I do not know, Xiao Qiang must not know
Xiao Qiang said: I do not know, but now I know
Xiao Ming said: Oh, then I also know
Please infer from the above dialogue which day is Mr. Zhang's birthday
Reason:
1. Xiao Ming said: If I do not know, Xiao Qiang certainly did not know, then: June 7 and December 2 was removed
2. Xiao Ming said: If I do not know, Xiao Qiang must not know + Xiao Qiang said: I do not know, but now I know
Then: Only June 4 is the only certainty