– While the train is moving, the jogger will also be running in the same direction.
– for the head(engine) of the train to get to the current position of the jogger 240m away, it will take:
45km/hr => 12.5m/s => 240/12.5 = 19.2 seconds.
– But in the same period of time, the jogger will still be running and will have moved to a new location by: 9km/hr => 2.5m/s => 2.5 * 19.2 = 48m
To get to the new location at the speed of 12.5m/s will take the train:
48/12.5 = 3.84sec
In this additional time, the jogger will move forward by:
3.84 * 2.5 = 9.6m
at a speed of 12.5m/s, it will take the train less than a second to cover the additional 9.6m
If we add the distance the jogger will cover in 1 second to 9.6, it is still less than what the train can cover per second. let us see (9.6 + 2.5 = 12.1)
Therefore, the head of the train will pass the runner at approximately: 19.2 + 3.84 + 1 => 24.04 seconds.
For the train to completely pass the runner, it will need its whole length of 120m to be in front of the runner.
This will take an additional (9.6 + 2) seconds.
Therefore for the length of the train to be ahead of the runner it will take approx. 35.65 (24.04 + 9.6 + 2) seconds
Answer: 3121 gold coins
Let total no of coins be M
Let the disbursement D to each son:
D1 = 1 + (M – 1)/5 = (M + 4)/5
D2 = 1 + ( M – D1 -1)/5 = (D1) * 4/5
D3= (D2) * 4/5
D4= (D3) * 4/5
D5= (D4) * 4/5
Total disbursements to sons=
= ∑D= (M+4)*1/5[ 1+4/5+(4/5)(4/5)+ (4/5)(4/5)(4/5)+(4/5)(4/5)(4/5)(4/5) ]
= (2101/3125)*(M+4)
Thus balance left for daughters =M-{(2101/3125)*(M+4)}
=(1024M-8404)/3125
This balance should be a positive integer ( assuming M and all disbursements are full coins )
Thus 1024M-8404 should be a multiple of 3125….so….
1024M – 8404 = N*3125 where N is an integer
Using Python code:
n=int(input(“Enter num n: “))
X=int()
a=int()
a=0
X=’ ‘
for a in range(0,n+1):
a=a+1
X= (3125*a + 8404)/1024
if (3125*a + 8404)% 1024== 0:
print(X,a)
Enter num n: 10000
3121.0 1020
6246.0 2044
9371.0 3068
12496.0 4092
15621.0 5116
18746.0 6140
21871.0 7164
24996.0 8188
28121.0 9212
We get minimum value of N = 1021 and M = 3121 gold coins
1, 2, 6, 15, 31, 56, 91
91
Servlets are faster as compared to JSP, as they have a short response time.
JSP is slower than Servlets – JSP is a HTML-based codes.
Servlets are harder to code, as here, the HTML codes are written in Java – JSPs are easier to code, as here Java is coded in HTML.
In an MVC architecture, Servlets act as the controllers. – In MVC architectures, the JSPs act as a view to present the output to the users.
The service() function can be overridden in Servlets. – The service() function cannot be overridden in JSPs.
I would say everyone has blind spots, and i would too. And that is why I believe in teamwork because when you are a team, you can point out other people’s blind spots and they will do the same for you.
let x be the avg age of each person in the family ten years
back…
so total age=6x
after 10 years i.e,now the total age of the family =6x+60
let grand father age as y
then the average of the family=(6x+60-y)/5
(bcoz grand father has expired and the new born baby has no
age at present)
according to the given question (6x+60-y)/5=x
bcoz x is the avg age bfore 10 years.
while calc the equation according to the presnt age we have
to add 10 to the result….
so the answer is 70
copy cat
13 Kigs & 6 Libs –> 510tors in 10hrs
” –> 51 tors/hr
14 Libs –> 484 tors in 12hrs
” –> 121/3 tors/hr
1 Lib –> 121/42 tors/hr
==> 6 Libs –> 121/7 tors/hr
Now,
13 kigs and 6 Libs –> 51 tors/hr
Only 13 Kigs –> 51 – (121/7) tors/hr
= 236/91 tors/hr
6 yeara old