- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# 200 logs are stacked in the following manner 20 logs in the bottom row, 19 in the next row, 18 in the row next to it and so on (see Figure). In how many rows are the 200 logs placed and how many logs are in the top row?

Given:

200 logs are stacked in the following manner 20 logs in the bottom row, 19 in the next row, 18 in the row next to it and so on.

To do:

We have to find the number of rows in which the 200 logs placed and the number of logs in the top row.

Solution:

Let the number of rows be $n$

The number of logs in the top be $a$

Here,

$a_{n}=20, d=1$ and $S_{n}=200$

We know that,

$a_{n}=a+(n-1) d$

$20=a+(n-1) 1$

$a=20-n+1$

$a=21-n$

$400=n[a+20]$

$n a+20 n=400$

$n(21-n)+20 n=400$

$21 n-n^{2}+20 n=400$

$n^{2}-41 n+400=0$

$n^{2}-25 n-16 n+400=0$

$n(n-25)-16(n-25)=0$

$(n-16)(n-25)=0$

$n-16=0$ or $n-25=0$

$n=16$ or $n=25$

If $n=16$, then,

$a+(n-1) d=20$

$a+(16-1) d=20$

$a+15 d=20$

$a+15(1)=20$

$a=20-15=5$

If $n=25$, then,

$a+(25-1) d=20$

$a+24(1)=20$

$a=20-24=-4$ which is not possible.

Hence, the number of rows are $16$ and the number of logs in the top row is $5$.

- Related Questions & Answers
- How to move the ResultSet cursor to the next row in JDBC?
- How to select next row pagination in MySQL?
- Select the next row after skipping every 2 rows in MySQL
- How to see request logs in Postman console?
- How to divide the row values by row mean in R matrix?
- How to divide the row values by row sum in R matrix?
- How to convert the row values in a matrix to row percentage in R?
- How to divide the row values by row sum in data.table object in R?
- How to divide the row values by row mean in data.table object in R?
- How to divide the row values by row mean in R data frame?
- How to divide the data frame row values in R by row median?
- How to divide the row values by row sum in R data frame?
- How to find the row products for each row in an R matrix?
- Deleting the nth row in MySQL?
- How to do a sum of previous row value with the current row and display the result in another row with MySQL cross join?
- How to get the row count in JDBC?