Outsbook Problem List
Outsbook Problem List
101 – Income:
A persons's daily income is X taka. What is her income in one
year. Solve this problem using python program .
Example:
if X = 216 then
In one year the income of the person is 78840 taka.
The Input
The input file contains one integer number X (X<=300).
The Output
Output will show the one integer numbers in a separate line.
Sample Input
216
Sample Output
78840
102 – Divisor:
In a division problem, the dividend is D, the quotient is Q and
the remainder is R. What is the divisor?
Example:
if D = 16, Q = 5 and R = 1 then
Divisor is 3
The Input
The input file contains only 3 integer
numbers D, Q and R (D<=4000, Q<100 and R<20).
The Output
Output will show the one integer numbers in a separate line.
Sample Input
16 5 1
Sample Output
3
Example:
if X = 7532, and Y = 560 then
Mina has 4046 taka and Rina has 3486 taka.
The Input
The input file contains only 2 integer
numbers X and Y (X<=10000 and Y<4000).
The Output
Output will show the two integer numbers first one
is Mina's and second one is Rina's taka which is seperate by
space in a separate line.
Sample Input
7532 560
Sample Output
4046 3486
104 – Ages:
The sum of ages of a father and
his daughter is X years. Father's age is four times the age of
the daughter. What are their ages ?
Example:
if X = 80 then
Father's age is 64 years and daughter's age is 16 years.
The Input
The input file contains only 1 integer number X (X<=10000).
The Output
Output will show the two integer numbers first one
is father's and second one is daughter's age which is seperate by
space in a separate line.
Sample Input
80
Sample Output
64 16
Example:
if X = 623 and M = 15 then
price of 15 books is 1335.
The Input
The input file contains only 2 integer
numbers X and M (X<=10000 and M<30).
The Output
Output will show the one integer number which is the price
of M book in a separate line.
Sample Input
623 15
Sample Output
1335
106 - Hostel Meal:
The Problem
In a hostel there is food for X students for M days. If Y new
students arrive, how long will the food last ?
Example:
if X = 40, M = 20 and Y = 10 then
food will last 16 days
The Input
The input file contains only 3 integer
numbers X ,M and Y (X<=1000, M<365 and Y<=1000).
The Output
Output will show the one integer number which is the days food
will last in a separate line.
Sample Input
40 20 10
Sample Output
16
Example:
if X = 200, D1 = 15 and D2 = 10 then
100 additional persons must be employed.
The Input
The input file contains only 3 integer
numbers X , D1 and D2 (X<=1000, D1<=365, D2<=365
and D2 < D1).
The Output
Output will show the one integer number which is additional
persons must be employed in a separate line.
Sample Input
200 15 10
Sample Output
100
108 – Dividend:
In a division problem, the divisor is D, the quotient
is Q and the remainder is one-third of the divisor. What is the
dividend ?
Example:
if D = 3 and Q = 5 then
Dividend is 16
The Input
The input file contains only 2 integer numbers D,
and Q (D<=4000, Q<100).
The Output
Output will show the one integer numbers in a separate line.
Sample Input
35
Sample Output
16
Example:
if Y1 = 10, Y2 = 12, Y3 = 13, Y4 = 11 and Y5 = 14 years then
Average age is 12 years.
The Input
The input file contains only 5 integer numbers Y1, Y2, Y3,
Y4 and Y5 (Y1, Y2, Y3, Y4, Y5<=30).
The Output
Output will show the one integer number which is the average
age in a separate line.
Sample Input
10 12 13 11 14
Sample Output
12
Example:
if R1 = 76, and R2 = 21 then
Players of the visiting team made 54 runs on average in that
series.
The Input
The input file contains only 2 integer numbers R1 and R2 (R1,
R2<=200).
The Output
Output will show the integer number which is the average run
of visiting team seperate by space in a separate line.
Sample Input
76 21
Sample Output
54
Example:
if X = 17, Y = 13, and M = 25 then
Father's age is 37 years.
The Input
The input file contains only 3 integer numbers X, Y, M (X, Y,
M<=50).
The Output
Output will show the one integer numbers which is father's age
in a separate line.
Sample Input
17 13 25
Sample Output
37
Example:
if X = 1280, and P = 40 then
512 persons are educated.
The Input
The input file contains only 2 integer numbers X, P (X < 10000,
P<=100).
The Output
Output will show the one integer numbers which is educated
persons in the village in a separate line.
Sample Input
1280 40
Sample Output
512
Example:
if X = 50, and Y = 55 then
The percentage profit is 10 taka.
The Input
The input file contains only 2 integer numbers X, Y (X <
10000<= Y <= 30000).
The Output
Output will show the one integer numbers which is
profit percentage in a separate line.
Sample Input
50 55
Sample Output
10
Example:
if X = 50, and Y = 46 then
The percentage loss is 8 taka.
The Input
The input file contains only 2 integer numbers X, Y (Y < 10000
<= X <= 30000).
The Output
Output will show the one integer numbers which is loss
percentage in a separate line.
Sample Input
50 46
Sample Output
8
Example:
if P = 7, X = 800, and Y = 5 then
The interest is 280 taka.
The Input
The input file contains only 3 integer numbers P, X, Y (P <
100, X < 10000, Y < 30).
The Output
Output will show the one integer numbers which is the interest
in a separate line.
Sample Input
7 800 5
Sample Output
280
Example:
if X = 500, Y = 3, and I = 105 then
The percentage rate of interest is 7 taka per annum.
The Input
The input file contains only 3 integer numbers X, Y, I (X <
10000, Y < 30, I < 40000 ).
The Output
Output will show the one integer numbers with percentage sign
(%) which is the percentage rate of interest per annum in a
separate line.
[Note: Don't forget to put % sign after the integer value]
Sample Input
500 3 105
Sample Output
7%
117 - Principal Amount:
The rate of interest being P% what amount of money will
earn I taka as interest in Y years ?
Example:
if P = 8, I = 240, and Y = 5 then
600 taka will earn
The Input
The input file contains only 3 integer numbers P, I, Y (P <
100, I < 40000, Y < 30).
The Output
Output will show the one integer number which is the principal
amount in a separate line.
Sample Input
8 240 5
Sample Output
600
Example:
if P = 5 and X = 2100 then
Previous population of the village 2000.
The Input
The input file contains only 2 integer numbers P, X (P<100, X <
10000).
The Output
Output will show the one integer numbers which is previous
population of the village in a separate line.
Sample Input
5 2100
Sample Output
2000
119 – Pass:
In an examination out of X students Y failed, What percentage
of students passed in that examination ?
Example:
if X = 40 and Y = 4 then
percentage of passed 90%
The Input
The input file contains only 2 integer
numbers X, Y (X<1000, Y < 500, X >= Y).
The Output
Output will show the one integer numbers which is percentage
of passed students in a separate line.
Sample Input
40 4
Sample Output
90%
Example:
if X = 25 and Y = 15 then
Increase rate 1%
The Input
The input file contains only 2 integer
numbers X, Y (X<1000, Y < 1000, X >= Y).
The Output
Output will show the one integer numbers which is percentage
rate of increase of polulation in a separate line.
Sample Input
25 15
Sample Output
1%
121 – Quotient:
Dividing a number by X1, the quotient is Q1 and the remainder
is R1. What will be the quotient Q2 and remainder R2 when
the number is divided by X2 ?
Example:
If X1 = 54, Q1 = 18, R1 = 50 and X2 = 73 then
the quotient is Q2 = 14, and remainder R2 = 0
The Input
The input file contains 4 integer numbers X1, Q1,
R1 and X2 (X1, Q1, R1, X2<1000).
The Output
Output will show two integer numbers which
are quotient Q2 and remainder R2 seperated by space in a
separate line.
Sample Input
54 18 50 73
Sample Output
14 0
Example:
if T = 50000, X = 20000 and Y = 25000 then
Save money in a year 60000 Taka
The Input
The input file contains only 3 integer
numbers T, X, Y (T<100000, X<50000, Y < 50000).
The Output
Output will show the one integer number which amount of
money does Mr. Nezam save in a year in a separate line.
Sample Input
50000 20000 25000
Sample Output
60000 Taka
Example:
if D = 10, X = 11760 and Y = 7 then
The price of 7 writing pads 686 Taka
The Input
The input file contains only 3 integer
numbers D, X, Y (D<100, X<50000, Y < 500).
The Output
Output will show the one integer number which the price
of Y writing pads in a separate line.
Sample Input
10 11760 7
Sample Output
686 Taka
Example:
if P1 = 11, D1 = 30 and P2 = 22 then
15 Days
The Input
The input file contains only 3 integer numbers P1, D1, P2 (P1,
D1, P2<1000).
The Output
Output will show the one integer number which the days
will P2 persons harvest that crop in a separate line.
Sample Input
11 30 22
Sample Output
15 Days
Example:
if S1 = 500, D1 = 50, D2 = 10 and S2 = 300 then
food will last 25 days
The Input
The input file contains only 4 integer numbers S1, D1, D2, S2 (S1,
D1, D2, S2<=1000).
The Output
Output will show the one integer number which is the days food
will last in a separate line.
Sample Input
500 50 10 300
Sample Output
25 days
Example:
if X = 5, Y = 2, T = 5945 and T1 = 789 then
the price of one table 1000 taka
The Input
The input file contains only 4 integer numbers X, Y, T, T1 (X, Y <
100 and T, T1 <=100000).
The Output
Output will show the one integer number which is the price of
one table in a separate line.
Sample Input
5 2 5945 789
Sample Output
1000 Taka
Example:
if X = 100, X1 = 10, and X2 = 5 then
Proma 35, Rimi 25, Monisha 40
The Input
The input file contains only 3 integer numbers X, X1, and X2 (X,
X1, X2 < 1000).
The Output
Output will show the 3 integer numbers which is the flags
of Proma, Rimi and Monisha in a separate line.
Sample Input
100 10 5
Sample Output
Proma 35, Rimi 25, Monisha 40
Example:
if X = 6 and S = 14 then
The number is 4.
The Input
The input file contains two integer numbers X (X<=300)
and S (S<=500).
The Output
Output will show the one integer numbers in a separate line.
Sample Input
6 14
Sample Output
4
Example:
if X = 5 and D = 11 then
The number is 16.
The Input
The input file contains two integer numbers X (X<=300)
and D (D<=1000).
The Output
Output will show the one integer numbers in a separate line.
Sample Input
5 11
Sample Output
16
The Problem
Mr. Rahim is a rich man. He has many Orange gardens. Now it is
the time to harvest. He has two very faithful servants
named “Motu" and "Patlu”. So he ordered them to collect the
oranges. Both go to gardens separately and collect oranges,
whole day and returns at evening. But Mr. Rahim is very weak
at Math. Now your job is to write a program by which Mr.
Rahim can easily find the amount of
oranges Motu and Patlu collected together.
The Input
Input will consist of two number a and b denoting the amount
of Motu’s orange and Patlu’s orange and they are not greater
than 1000.
The Output
Output will show the total amount of orange collected
by Motu and Patlu in a separate line.
Sample Input
440 200
Sample Output
640
Volume 2
201 - Motu and Patlu:
The Problem
Mr. Rahim is a rich man. He has many Orange gardens. Now it is
the time to harvest. He has two very faithful servants
named “Motu" and "Patlu”. So he ordered them to collect the
oranges. Both go to gardens separately and collect oranges,
whole day and returns at evening. But Mr. Rahim is very weak
at Math. Now your job is to write a program by which Mr.
Rahim can easily find the amount of
oranges Motu and Patlu collected together.
The Input
Input will consist of two number a and b denoting the amount
of Motu’s orange and Patlu’s orange and they are not greater
than 1000.
The Output
Output will show the total amount of orange collected
by Motu and Patlu in a separate line.
Sample Input
440 200
Sample Output
640
202 - HELP!!!!!HELP!!!!!!:
The Problem
I think we all know basic rules of multiplying two
numbers. Diya and Hiya has just learned how to multiply two
numbers. So they are practicing very hard to get the Mastery on
it. So they need a small computer program to help them. The
program will give the multiplied product of two given integers.
The Input
Input Consists of only two numbers a and b (a,b<100).
The Output
Output will show the multiplied value of a and b in a separate
line.
Sample Input
15 5
Sample Output
75
203 – Diffy:
The Problem
Make a simple program that reads two variables named A, B.
Calculate and print the difference of A and B (A - B).
The Input
The input file contains 2 integer numbers A and B (A<1000
and B<1000).
The Output
Output will show the difference of A and B in a separate line.
Sample Input
200 50
Sample Output
150
The Problem
Make a simple program that reads four variables named A, B,
C, D. Calculate and print the difference between multiplication
of A, B and multiplicaiton of C, D (A * B - C * D).
The Input
The input file contains 4 integer numbers A, B,
C, and D (A<1000, B<1000, C<1000 and D<1000).
The Output
Output will show the difference of A * B and C * D in a
separate line.
Sample Input
10 4 5 2
Sample Output
30
The Problem
Mr. Ant add two numbers in an interesting way. He adds two
numbers such as
1+2=2
2+2=4
3+3=9
4 + 4 = 16
…
One day Mr. Ant’s friend Miss. Butterfly came for a visit at Mr.
Ant’s home. Mr. Ant asked Miss Butterfly can you add two
numbers. She became confuse, can you help Miss. Butterfly with
this?
The Input
The input file contains 2 integer numbers A and B (A<300
and B<300).
The Output
Output will show the confusing sum of A and B in a separate
line.
Sample Input
25 30
Sample Output
750
The Problem
Make a simple program that reads four variables named m, n, o,
p. Calculate and print the sum of subtraction of m, n and
subtraction of o, p.
The Input
The input file contains 4 integer numbers m, n,
o, and p (m<1000, n<1000, o<1000 and p<1000).
The Output
Output will show the SUM of m - n and o - p in a separate line.
Sample Input
10 4 5 2
Sample Output
9
207 – Car:
The Problem
There is a simple programming task in front of you. You will be
given initial velocity(u) of a car , acceleration(a) and elapsed time(t).
You have to find the final velocity(v) of the car.
The Input
The input consists of 3 integers in each line (a,b,c<50) denoting
the initial velocity,acceleration and elapsed time.
The Output
The output will be the final velocity in a seperate line.
Sample Input
123
Sample Output
7
The Problem
Make a simple program that reads two variables named a, b.
Calculate the formula of (a+b) 2.
The Input
The input file contains 2 integer
numbers a, and b (a<100, b<100).
The Output
Output will show the value of (a+b) 2 in a separate line.
Sample Input
24
Sample Output
36
The Problem
Nora is learning summation of numbers. So her Professor has
given her homework “Summation of numbers from 1 to N”.
Can you help Nora to complete her homework?
1 + 2 + 3 + … + N = ???
The Input
The input file contains 1 integer number N (N<=200).
The Output
Output will show the sum of series 1 to N numbers in a
separate line.
Sample Input
125
Sample Output
7875
The Problem
Nora has done the previous homework very nicely. So
her Professor has given her homework again. This
time Professor says “You have to find three consecutive
numbers whose summation is N.“
21 + 22 + 23 = 66
The Input
The input file contains one integer number N (N<=300).
The Output
Output will show the three consecutive integer numbers in a
separate line.
Sample Input
297
Sample Output
98 99 100
The Problem
Make a simple program that reads one variable
named N which is the summation of 3 consecutive odd
numbers. Print the 3 consecutive odd numbers whose
summation is N.
21 + 23 + 25 = 69
The Input
The input file contains one integer number N (N<=3000).
The Output
Output will show the 3 consecutive odd integer numbers
seperated by space in a separate line.
Sample Input
1617
Sample Output
537 539 541
The Problem
Make a simple program that reads one variable
named N which is the summation of 4 consecutive even
numbers. Print the 4 consecutive even numbers whose
summation is N.
22 + 24 + 26 + 28 = 100
The Input
The input file contains one integer number N (N<=5000).
The Output
Output will show the 4 consecutive even integer numbers
seperated by space in a separate line.
Sample Input
812
Sample Output
200 202 204 206
The Problem
Mrs. Rahman has a rectangle plot. He wants to dig a pond there.
For this he called Ali. Ali said he will charge taka as per
square of the pond. Ali also said 2 miters will be the edge of
the pond. Your work is to help Mrs. Rahman to find the area of
the pond as he can easily pay Ali.
The Input
The input file contains two integer numbers length, L (L<=500)
and width, W (W<=400) of the plot.
The Output
The output will show the area of the pond in a separate line.
Sample Input
80 65
Sample Output
4636
The Problem
Make a simple program that read one variable named N.
Calculate the summation of the squares of the first N integer
number(12 + 22 + 32 +…+N2).
The Input
The input file contain one integer number N (N<30).
The Output
Output will show the summation of the squares of the first N
integer numbers.
Sample Input
20
Sample Output
2870
The Problem
Akash is a student of class VII. He is 20 years younger than his
father,Mr. Rahman but he is 6 years older than his
sister Ritu. Ritu is 6 months older than her sister Mitu.
If Mitu is N years old then what will be her
father, Mr. Rahman’s age.
The Input
Input will contain a single integer number N (N<=20) age
of Mitu.
The Output
The output will contain two integer numbers years and months
separate by a space will show in a separate line.
Sample Input
8
Sample Output
34 Years 6 Months
The Problem
Motu and Patlu has a food shop. This days their shop is
making enough revenue. Motu's share is 2 time greater
than Patlu's share. So while distributing the
money Motu always gets double money than Patlu. So now
as Motu and Patlu are very weak in math they need your help.
So now write a program to find out Motu's amount
and Patlu's amount from the total money.
The Input
The input will be a integer number (a<30,000) denoting the
total money. (The total amount will be a number which is always distributable
according to the above description so You need not think about fractions.)
The Output
For each input you have to show the Motu's money
and Patlu's money which is separated by space in a separate
line.
Sample Input
9372
Sample Output
6248 3124
The Problem
The national flag of Bangladesh is bottle green in color and
rectangular in size with the length (L) to width(W) ratio of 10:6.
It bears a red circle on the background of green. If the lenght
is L can you find the width (W).
The color in the background represents the greenery of
Bangladesh while the red circle symbolizes the rising sun and
the sacrifice of lives in our freedom fight.
Example:
if L = 10 then W = 6
The Input
The input file contains only one integer numbers L , which is
the length of the flag (L<=1500).
The Output
Output will show the one integer number which is the width(W)
of the flag in a separate line.
Sample Input
10
Sample Output
6
The Problem
Make a simple program that reads one variables named N. Now
do the process multiply N by 567, then divide the result by 9,
then add 7492, then multiply by 235, then divide by 47, then
subtract 498. Print the final result.
The Input
The input file contains 1 integer numbers N (1<N<40).
The Output
Output will show the process value in a separate line.
Sample Input
11
Sample Output
40427
The Problem
There is an H feet long Bamboo which is smeared with oil. A
monkey climb up M feet at first minute & drop down N feet in
the second minute. So now find out how many minutes it will
take to reach the ending point of the bamboo?
The Input
The input file contains three integer number H, M & N (H<1000,
M<1000, N<1000 and M>N).
The Output
Output will show the total minutes take to reach the ending
point of the bamboo.
Sample Input
92 12 8
Sample Output
41
220 – Midpoint:
The Problem
The Output
Output will show two intiger values seperated by space which
represend the midpoint in a separate line.
Sample Input
480 785 472 233
Sample Output
476 509
221 – Farming:
The Problem
Ramij is a farmer. He wants to plough a farm field on time, so
he must plough M hectares a day. For technical reasons he
ploughed only P hectares a day, hence he had to
plough C more days than he planned and he still
has D hectares left.
Now write a program to calculate the area of the farm field and
how many days Ramij planned to work initially.
The Input
There will be 4 inputs (M, P, C, D<100) in each line according to
above description.
The Output
For each line of output print the area of the farm field and how
many days Ramij will work initially.
Sample Input
120 85 2 40
Sample Output
6 720