C
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
2880, 480, 92, 24, 8, 4, 4
4×1 = 4
4×2=8
8×3=24
24×4= 96 (not 92)
96×5 =480
480×6= 2880
So answer is 92
8, 7, 11, 12, 14, 17, 17, 22, (…..)
20
385, 462, 572, 396, 427, 671, 264
427 is the answer
Because
385 means (3+5=8) or (8-3=5) ,
462 means (4+2=6) or (6-2=4) ,
572 means (5+2=7) or (7-5=2) ,
396 means (6+3=9) or (9-3=6) ,
671 means (6+1=7) or (7-6=1) ,
264 means (4+2=6) or (6-2=4) ,
but only 427 is the number in which if we do addition of any of its two digits (e.g 4+2 or 4+7) then its answer doesn’t come 3rd digit
like if we do 4+2 then answer will be 6 so the number should be 426 but it is not
or if we do 7-4 then answer will be 3 (not 2)
so the right answer is 427
10%
10, 25, 45, 54, 60, 75, 80
54
P+C+M=80
P+C=70
Therefore M=10
Given , P+M=90
If M=10
P=80
In a cube all the diagonal and sides are equal, we can go diagonally.
9, 12, 11, 14, 13, (…..), 15
16
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.
C will get RS 95