Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 17 Sep 2017 My Price 10.00

bird shooting enthusias

You are a bird shooting enthusiast. You are standing on position 0 and a flock of birds (assume infinitely many birds) is flying away from you at 1m/s.
The flock of birds is initially at 1m away from you.

 

Your rating is (P, N) and your time lag is (T, R). This means the following.

 

  • If P is your precision rating : At every turn, beginning when the birds are at 1m position, you take a shot at one of the birds in the flock.
    Suppose at this turn, if the flock of birds is Xm away from you, then probability that shot is successful is 1 / XP.
  • N is your range : You can only shoot at the flock of birds if it is at a distance less than or equal to N.

  • T is your reload time : After every shot, you reload your gun, and that takes time T. The next time you shoot, thus the flock of birds is T more meters away than it initially was.
  • R is your rejoicing time :D : If you are successful in shooting a bird, you rejoice your success and spend an extra amount of time R in reloading
    (taking a total of T + R time before the next shot).

 

Assume that you have infinitely many bullets.

 

Given N, P, T, and R. Find the expected number of birds you will shoot down!

 

Input

 

A single line containing space separated 4 numbers N, P, T, and R, in that order. P is a real number while others are positive integers.

 

Output

 

A single line containing the expected number of birds you will shoot down. The output should be correct to within 10^(-6) of the actual answer.

 

Constraints

 

  • P is a real number, 1
  • 1 = N = 10^18
  • 1 = T = 10^5
  • 1 = R = 10^5
  • Further, ln(N)

 

Example

Input: 10 2 3 4 Output: 1.015625

Answers

(5)
Status NEW Posted 17 Sep 2017 12:09 PM My Price 10.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)