Assignment 01 Full Solution by Sabbir Hossen (AE-017)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

First Year B.S.

Honours (Session: 2022-2023)


Department of Applied Mathematics, University of Dhaka
Course Title: Math Lab I (Mathematica), Course No.: AMTH 150
Assignment 01 (Solution)

Name : G.M. Sabbir Hossen Sohan


Roll : AE – 123 – 017
Merit : AE – 1977
Group : A
Subject : Math Lab – I (Mathematica)
Assignment No : 01
Questions : Question 1 – 8

Submitted To :
Dr. S.M. Chapal Hossain (CH)
Md. Shorif Hossan (MSH)
(*Answer to the Question No : 1*)

(*Step 1 : Input an integer n*)


n = Input["Enter an integer n: "]
O u t [ ] =

10

I n [ ] : = (*a: Evaluate 2n-1 and store the result*)


resultA = 2 * n - 1

O u t [ ] =

19

I n [ ] : = (*b: Find the divisor of n*)


divisors = Divisors[n]
O u t [ ] =

{1, 2, 5, 10}

I n [ ] : = (*c: Step 2(a): Calculate the Factorial of n using Do loop*)


Table[n !, {n, 10}]

I n [ ] : = {1, 2, 6, 24, 120, 720, 5040, 40 320, 362 880, 3 628 800}

n!
O u t [ ] =

{1, 2, 6, 24, 120, 720, 5040, 40 320, 362 880, 3 628 800}
O u t [ ] =

3 628 800

I n [ ] : = Clear[fact]
fact = 1
(*This is the initialization step*)
Do[fact = fact n, {n, 1, 10}]
Print[fact]
O u t [ ] =

3 628 800

I n [ ] : = (*Similarly :*)
Clear[fact]
fact = 2
(*This is the initialization step*)
Do[fact = fact n, {n, 1, 10}]
Print[fact]
O u t [ ] =

7 257 600
2 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

(*c: Step 2(b): Calculate the Factorial of n using For loop*)


Clear[fact]
For[fact = 1; i = 1, i < 11, i ++, fact = fact * i]
Print[fact]
3 628 800

I n [ ] : = (*Similarly: *)
Clear[fact]
For[fact = 2; i = 1, i < 11, i ++, fact = fact * i]
Print[fact]
7 257 600

I n [ ] : = (*c: Step 2(c): Calculate the Factorial of n using While loop*)


Clear[fact]
i = 1; fact = 1; While[i < 11, fact = fact * i; i ++]
Print[fact]
3 628 800

I n [ ] : = (*Similarly*)
Clear[fact]
i = 2; fact = 2; While[i < 11, fact = fact * i; i ++]
Print[fact]
7 257 600

I n [ ] : =

(*(d): Calculate the nth Fibonacci number using a recursive function *)


Table[Fibonacci[n], {n, 20}]
O u t [ ] =

{1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765}

I n [ ] : = (*(e): Find the value of n for which 2^(2n)+1 is not prime *)


isPrime[n_] := If[n < 2, False, PrimeQ[n]]

n = 1;
While[isPrime[2 ^ (2 n) + 1], n ++];
Print[n]
3

I n [ ] : =

(*(f): Find the number of primes less than or equal to n*)


primeInf[n_] := Prime @ Range @ PrimePi @ n
primeInf @ 20
1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 3

I n [ ] : = {2, 3, 5, 7, 11, 13, 17, 19}

I n [ ] : = (*(g): Find the next prime larger than n*)


n = Input["Enter the value of n: "]
nextPrime = NextPrime[n]
O u t [ ] =

100

101

(*(h): Compute nC4 using a loop*)


n = 10;
k = 4;
result = 1;

For[i = 0, i < k, i ++, result *= (n - i) / (i + 1)]

result

O u t [ ] =

210

(*Answer to the Question No: 2*)


(*2(a)Find the value of series using Do loop Only <25*)
u = 0; s = 0;
Do[u = (i + 2) / (2 ^ (i + 2)); s = s + u, {i, 1, 24}]
N[s]
O u t [ ] =

0.999855

(* 2(b)Find the value of the series using For Loop*)


u = 0; s = 0;
For[i = 1, i ≤ 100, i ++, u = (i + 2) / (2 ^ (i + 2)); s = s + u]
N[s]
O u t [ ] =

1.
4 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

I n [ ] : =

(*2.b(i) : Input an integer n. Compute the sum and the product of the terms 1,
1+1/3,1+1/3+1/5,......... 1+1/3+1/5+.........+nth term using Do loop*)
n = Input["Enter the value of n: "];

sum = 0;
product = 1;

Do[term = Sum[1 / (2 i - 1), {i, 1, k}];


sum += term;
product *= term;, {k, 1, n}]

Print["Sum: ", sum];


Print["Product: ", product];

12 054 763
Sum:
692 835
2 139 206 887 586 802 656 551 105 230 340 096
Product:
10 598 898 402 009 350 930 602 965 234 375

I n [ ] : =

(*2.b(ii) : Input an integer n. Compute the sum and the product of the terms 1,
1+1/3,1+1/3+1/5,......... 1+1/3+1/5+.........+nth term using For loop *)
n = Input["Enter the value of n: "];

sum = 0;
product = 1;

For[k = 1, k ≤ n, k ++, term = Sum[1 / (2 i - 1), {i, 1, k}];


sum += term;
product *= term;]

Print["Sum: ", sum];


Print["Product: ", product];

12 054 763
Sum:
692 835
2 139 206 887 586 802 656 551 105 230 340 096
Product:
10 598 898 402 009 350 930 602 965 234 375
1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 5

(*Answer to the Question No :3*)

(*3(a) Generate a list consisting of 15 random integers between -20 to 20*)


randomIntegers = RandomInteger[{- 20, 20}, 15]
O u t [ ] =

{8, 18, - 2, 13, - 11, - 11, 14, 7, - 13, 11, - 3, 14, 9, - 20, - 7}

I n [ ] : = (*3(b) Compute their arithmetic mean(A.M.),


geometric mean(G.M.) and harmonic mean(H.M.)*)
numbers = {8, 18, - 2, 13, - 11, - 11, 14, 7, - 13, 11, - 3, 14, 9, - 20, - 7}

(*Arithmetic Mean*)
arithmeticMean = Mean[numbers]

(*Geometric Mean*)
geometricMean = N[GeometricMean[numbers]]

(*Harmonic Mean*)
harmonicMean = N[HarmonicMean[numbers]]

O u t [ ] =

{8, 18, - 2, 13, - 11, - 11, 14, 7, - 13, 11, - 3, 14, 9, - 20, - 7}
O u t [ ] =
9
5
O u t [ ] =

9.09546 + 1.9333 
O u t [ ] =

- 27.7923
6 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

(*3(c) Check whether 13 is in the list.If yes,


replace it with 31. If not, insert 13 at the 13th position in the list*)
randomIntegers = RandomInteger[{- 20, 20}, 15];

If[MemberQ[randomIntegers, 13], randomIntegers = Replace[randomIntegers, 13  31],


randomIntegers = Insert[randomIntegers, 13, 13]]

randomIntegers

O u t [ ] =

{- 3, - 15, - 11, 2, 19, - 19, - 5, - 10, 6, 1, - 14, 4, 13, - 19, 12, - 13}

{- 3, - 15, - 11, 2, 19, - 19, - 5, - 10, 6, 1, - 14, 4, 13, - 19, 12, - 13}

I n [ ] : = (*3(d) Create a list contating the square of the elements of the list obtained in a*)
originalList = {8, 18, - 2, 13, - 11, - 11, 14, 7, - 13, 11, - 3, 14, 9, - 20, - 7};
squaredList = # ^ 2 & /@ originalList;
squaredList

O u t [ ] =

{64, 324, 4, 169, 121, 121, 196, 49, 169, 121, 9, 196, 81, 400, 49}

(*3(e) Create another list containing the


cube of the elements of the list obtained in a*)

originalList = {8, 18, - 2, 13, - 11, - 11, 14, 7, - 13, 11, - 3, 14, 9, - 20, - 7};

I n [ ] : = cubedList = # ^ 3 & /@ originalList;


cubedList
O u t [ ] =

{512, 5832, - 8, 2197, - 1331, - 1331, 2744, 343, - 2197, 1331, - 27, 2744, 729, - 8000, - 343}

(*3(f) Constructing a table showing horizontally the results of a,


d and e with proper headings: *)
1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 7

(*(a) Generate a list consisting of 15 random integers between-20 to 20*)


originalList = {8, 18, - 2, 13, - 11, - 11, 14, 7, - 13, 11, - 3, 14, 9, - 20, - 7};

(*(d) Create a list containing the square of the elements from (a)*)
squaredList = originalList ^ 2;

(*(e) Create another list containing the cube of the elements from (a)*)
cubedlist = originalList ^ 3;

(*(f): Finishing : Construct a table with proper headings*)


data = Transpose[{originalList, squaredList, cubedlist}];
table = Prepend[data, {"Original List", "Squared", "Cubed"}];

Grid[table, Frame  All, Alignment  Left, Background  {{LightBlue}}]

O u t [ ] =

Original List Squared Cubed


8 64 512
18 324 5832
-2 4 -8
13 169 2197
- 11 121 - 1331
- 11 121 - 1331
14 196 2744
7 49 343
- 13 169 - 2197
11 121 1331
-3 9 - 27
14 196 2744
9 81 729
- 20 400 - 8000
-7 49 - 343

Transpose: "Permutation
{{-3, -15, -11, 2, 19, -19, -5, -10, 6, 1, 6}, {64, 324, 4, 169, 121, 121, 196, 49, 169, 121, 5}, {512, 5832, -8, 2197, -1331, -1
331, 2744, 343, -2197, 1331, 5}} is longer than the dimensions {3} of the expression."

I n [ ] : = (*Answer to the Question No: 4*)

(*Number of rows in Pascal's Triangle*)


n = 5;
pascalTriangle = Table[Binomial[n, k], {n, 0, n}, {k, 0, n}];
pascalTriangle // MatrixForm
8 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

{1}
{1, 1}
{1, 2, 1}
{1, 3, 3, 1}
{1, 4, 6, 4, 1}
{1, 5, 10, 10, 5, 1}

I n [ ] : = (*Answer to the Question No : 5*)

(*Step 1 : Answering to the Question No : (a)*)


TableForm[BooleanTable[{p, q, p ∨ q, ¬ p, (p ∨ q) ∧ (¬ p), (p ∨ q) ∧ (¬ p)  q}, {p, q}],
TableHeadings  {None, {"p", "q", "p∨q", "¬p", "(p∨q)∧(¬p)", "(p∨q)∧(¬p)q"}},
TableAlignments  Center]

O u t [ ] / / T a b l e F o r m =
p q p∨q ¬p (p∨q)∧(¬p) (p∨q)∧(¬p)q
True True True False False True
True False True False False True
False True True True True True
False False False True False True

I n [ ] : = (*Step 2 : Answering to the Question No : (b)*)


TableForm[BooleanTable[{p, q, ¬ p, ¬ q, (p  ¬ q), (p  ¬ q) ∧ (¬ p)  q}, {p, q}],
TableHeadings  {None, {"p", "q", "¬p", "¬q", "(p¬q)", "(p¬q)∧(¬p)q"}},
TableAlignments  Center]
O u t [ ] / / T a b l e F o r m =
p q ¬p ¬q (p¬q) (p¬q)∧(¬p)q
True True False False False True
True False False True True True
False True True False True True
False False True True True False
1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 9

I n [ ] : = (*Answer to the Question No : 6*)

(*Given data*)
totalStudents = 75;
newspaperStudents = 29;
televisionStudents = 43;
bothStudents = 7;

(*Step 6(a): Calculate the number of students who got news from only newspaper*)
onlyNewspaperStudents = newspaperStudents - bothStudents;

(*Step 6(b): Calculate the number of students who got news from only television*)
onlyTelevisionStudents = televisionStudents - bothStudents;

(*Step 6(c):
Calculate the number of students who got news from either newspaper or television*)
eitherOrStudents = onlyNewspaperStudents + onlyTelevisionStudents + bothStudents;

(*Step 6(d): Calculate the number of students


who did not get news from either newspaper or television*)
neitherStudents = totalStudents - eitherOrStudents;

(*Output the results*)


onlyNewspaperStudents
onlyTelevisionStudents
eitherOrStudents
neitherStudents

O u t [ ] =

22
O u t [ ] =

36
O u t [ ] =

65
O u t [ ] =

10
10 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

(*Answer to the Question No :7*)

(*Answer to the Question No : 7(a)


Borda Count Method: In the Borda Count method,
candidates receive points based on their ranking in each voter'
s preferences. The candidate with the highest total points wins.*)

(*Create a list of candidates and their first,second,third,and fourth choice votes*)


candidates = {A, B, C, D};
firstChoiceVotes = {14 000 000, 8 000 000, 0, 4 000 000};
secondChoiceVotes = {4 000 000, 14 000 000, 0, 8 000 000};
thirdChoiceVotes = {0, 0, 14 000 000, 0};
fourthChoiceVotes = {8 000 000, 4 000 000, 0, 14 000 000};

(*Calculate the Borda Count for each candidate*)


bordaCount = Table[Total[{4 firstChoiceVotes〚i〛, 3 secondChoiceVotes〚i〛,
2 thirdChoiceVotes〚i〛, 1 fourthChoiceVotes〚i〛}], {i, Length[candidates]}];

(*Combine candidate names with their respective Borda Counts*)


candidatePoints = Transpose[{candidates, bordaCount}];

(*Sort the candidates by their Borda Counts in descending order*)


sortedCandidatesBorda = Reverse[SortBy[candidatePoints, Last]];

(*Determine the winner*)


winnerBorda = First[sortedCandidatesBorda];

(*Display the results*)


sortedCandidatesBorda
winnerBorda

O u t [ ] =

{{B, 78 000 000}, {A, 76 000 000}, {D, 54 000 000}, {C, 28 000 000}}
O u t [ ] =

{B, 78 000 000}


1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 11

I n [ ] : = (*Answer to the Question No 7 (b)


Plurality Method: In the Plurality method,
the candidate with the most first-choice votes wins.*)

(*Calculate the total first-choice votes for each candidate*)


totalFirstChoiceVotes = Total[firstChoiceVotes];

(*Combine candidate names with their respective first-choice votes*)


candidateVotes = Transpose[{candidates, firstChoiceVotes}];

(*Sort the candidates by their first-choice votes in descending order*)


sortedCandidatesPlurality = Reverse[SortBy[candidateVotes, Last]];

(*Determine the winner*)


winnerPlurality = First[sortedCandidatesPlurality];

(*Display the results*)


sortedCandidatesPlurality
winnerPlurality

O u t [ ] =

{{A, 14 000 000}, {B, 8 000 000}, {D, 4 000 000}, {C, 0}}

{A, 14 000 000}

(*Answer to the Question No : 7(c)


Plurality with Elimination Method: In the Plurality with Elimination method,
candidates are eliminated one by one until
a candidate receives more than 50% of the votes.*)
12 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

(*Define the number of votes for each candidate and round*)


votes = {{14 000 000, 8 000 000, 0, 4 000 000}, {4 000 000, 14 000 000, 8 000 000, 0},
{0, 0, 14 000 000, 0}, {8 000 000, 4 000 000, 0, 14 000 000}};
round = 1;

(*Keep track of the eliminated candidates*)


eliminated = {};

(*Define the number of candidates*)


numCandidates = Length[votes〚1〛];

(*Determine the total votes for each candidate in the current round*)
totalVotes = Total /@ Transpose[votes];

While[Max[totalVotes] < Total[votes〚1〛],


(*Find the candidate with the fewest first-choice votes in the current round*)
minVotes = Min[totalVotes];
eliminatedCandidate = Position[totalVotes, minVotes]〚1, 1〛;

(*Eliminate the candidate from the remaining rounds*)


eliminated = AppendTo[eliminated, eliminatedCandidate];
votes = Delete[votes, eliminatedCandidate];
numCandidates --;

(*Update the total votes for the remaining candidates in the current round*)
totalVotes = Total /@ Transpose[votes];

(*Increment the round number*)


round ++;]

(*Determine the winner from the last round*)


winner = Position[totalVotes, Max[totalVotes]]〚1, 1〛;

(*Display the results*)


TableForm[Transpose[{CharacterRange["A", "D"], totalVotes}],
TableHeadings  {None, {"Candidate", "Total Votes"}}]
Print["Winner: Candidate ", CharacterRange["A", "D"]〚winner〛, " (Round ", round, ")"]

O u t [ ] / / T a b l e F o r m =
Candidate Total Votes
A 26 000 000
B 26 000 000
C 22 000 000
D 18 000 000

Winner: Candidate A (Round 1)


1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 13

(*Answer to the Question No : 7(d)


Pairwise Comparison Method: Pairwise comparison involves comparing each candidate
against every other candidate to see who wins the most pairwise matchups.*)

(*Create a list of candidates*)


candidates = {A, B, C, D};

(*Create a function to compare two candidates*)


compareCandidates[c1_, c2_] := Module[{votesC1, votesC2},
(*Calculate the number of votes where c1 is ranked higher than c2*)
votesC1 = Count[preferenceTable, {c1, ___, c2, ___}];
(*Calculate the number of votes where c2 is ranked higher than c1*)
votesC2 = Count[preferenceTable, {c2, ___, c1, ___}];
(*Return the result of the comparison*)
If[votesC1 > votesC2, c1, If[votesC2 > votesC1, c2, "Tie"]]];

(*Compare candidates in pairwise matchups*)


pairwiseWinners = Table[Table[compareCandidates[candidates〚i〛, candidates〚j〛],
{j, i + 1, Length[candidates]}], {i, Length[candidates]}];

(*Count the number of times each candidate wins*)


pairwiseWins =
Table[Total[Boole[pairwiseWinners〚i〛  candidates〚i〛]], {i, Length[candidates]}];

(*Determine the winner*)


winnerPairwise = candidates〚First[Position[pairwiseWins, Max[pairwiseWins]]]〛;

(*Display the results*)


pairwiseWinners
pairwiseWins
winnerPairwise
O u t [ ] =

{{Tie, A, A}, {B, B}, {Tie}, {}}


O u t [ ] =

{Total[Boole[{Tie, A, A}  A]], Total[Boole[{B, B}  B]],


Total[Boole[{Tie}  C]], Total[Boole[{}  D]]}
O u t [ ] =

{A, B, C, D}〚First[{}]〛

Part: The expression First[{}] cannot be used as a part specification.

First: {} has zero length and no first element.

First: "{} has zero length and no first element."

Part: The expression First[{}] cannot be used as a part specification.


14 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

(*Answer to the Question No : 8*)

(*Answer to the Question No 8 (a.i)*)


(*Find the standard divisor for each department.*)
totalRooms = 500;
totalStudents2022 = {2950, 2040, 1730, 1500, 780};
totalStudents2023 = {2960, 2040, 1810, 1500, 780};

standardDivisor2022 = totalRooms / Total[totalStudents2022];


standardDivisor2023 = totalRooms / Total[totalStudents2023];

standardDivisor2022
standardDivisor2023

O u t [ ] =
1
18
O u t [ ] =
50
909

I n [ ] : = (*Answer to the Question No : 8(a.ii)*)


(*Next, calculate the standard quota,
lower quota and upper quota for each department.*)
standardQuota2022 = standardDivisor2022 * totalStudents2022;
standardQuota2023 = standardDivisor2023 * totalStudents2023;

lowerQuota2022 = Floor[standardQuota2022];
lowerQuota2023 = Floor[standardQuota2023];

upperQuota2022 = Ceiling[standardQuota2022];
upperQuota2023 = Ceiling[standardQuota2023];

{standardQuota2022, lowerQuota2022, upperQuota2022}


{standardQuota2023, lowerQuota2023, upperQuota2023}

O u t [ ] =
1475 340 865 250 130
 , , , , , {163, 113, 96, 83, 43}, {164, 114, 97, 84, 44}
9 3 9 3 3
O u t [ ] =
148 000 34 000 90 500 25 000 13 000
 , , , , , {162, 112, 99, 82, 42}, {163, 113, 100, 83, 43}
909 303 909 303 303
1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb 15

(*Answer to the Question No : 8(b)*)


(*Using Hamilton's method,find the appropriate apportionment of the 500 rooms among
the students of the different departments in 2022 and 2023 respectively.*)
hamiltonApportionment2022 = Round[standardQuota2022];
hamiltonApportionment2023 = Round[standardQuota2023];

hamiltonApportionment2022
hamiltonApportionment2023
O u t [ ] =

{164, 113, 96, 83, 43}


O u t [ ] =

{163, 112, 100, 83, 43}

I n [ ] : = (*Answer to the Question no: 8(c)*)


(*Using Jefferson's method,find the appropriate apportionment of the 500 rooms among
the students of the different departments in 2022 and 2023 respectively.*)
jeffersonApportionment2022 = lowerQuota2022;
jeffersonApportionment2023 = lowerQuota2023;

remainingRooms2022 = totalRooms - Total[jeffersonApportionment2022];


remainingRooms2023 = totalRooms - Total[jeffersonApportionment2023];

fractionalParts2022 = standardQuota2022 - lowerQuota2022;


fractionalParts2023 = standardQuota2023 - lowerQuota2023;

sortedDepartments2022 = SortBy[
Transpose[{Range[Length[fractionalParts2022]], fractionalParts2022}], Last]〚All, 1〛;
sortedDepartments2023 = SortBy[
Transpose[{Range[Length[fractionalParts2023]], fractionalParts2023}], Last]〚All, 1〛;

For[i = 1, i ≤ remainingRooms2022, i ++,


jeffersonApportionment2022〚sortedDepartments2022〚i〛〛 ++;]

For[i = 1, i ≤ remainingRooms2023, i ++,


jeffersonApportionment2023〚sortedDepartments2023〚i〛〛 ++;]

jeffersonApportionment2022
jeffersonApportionment2023

O u t [ ] =

{163, 114, 97, 83, 43}


O u t [ ] =

{162, 113, 100, 83, 42}


16 1. (b) Assignment 01 Full Ques Solution by Sabbir Hossen (AE-1977).nb

I n [ ] : = (*Answer to the Question No : 8(d)*)


(*Using Adams's method, find the appropriate apportionment of the 500 rooms among
the students of the different departments in 2022 and 2023 respectively.*)
modifiedDivisor2022 = Sqrt[standardDivisor2022 * (standardDivisor2022 + 1)];
modifiedDivisor2023 = Sqrt[standardDivisor2023 * (standardDivisor2023 + 1)];

adamsApportionment2022 = Round[totalStudents2022 * modifiedDivisor2022];


adamsApportionment2023 = Round[totalStudents2023 * modifiedDivisor2023];

adamsApportionment2022
adamsApportionment2023

O u t [ ] =

{714, 494, 419, 363, 189}


O u t [ ] =

{713, 491, 436, 361, 188}

I n [ ] : = (*Answer to the Question No : 8(e)*)


(*Using Webster's method,find the appropriate apportionment of the 500 rooms among
the students of the different departments in 2022 and 2023 respectively.*)
modifiedDivisorWebster2022 = standardDivisor2022 + 0.5;
modifiedDivisorWebster2023 = standardDivisor2023 + 0.5;

websterApportionment2022 = Round[totalStudents2022 * modifiedDivisorWebster2022];


websterApportionment2023 = Round[totalStudents2023 * modifiedDivisorWebster2023];

websterApportionment2022
websterApportionment2023

O u t [ ] =

{1639, 1133, 961, 833, 433}


O u t [ ] =

{1643, 1132, 1005, 833, 433}

You might also like