Maximum Encyclopedia Overhang

Problem #81

Tags: physics puzzle difficult

Who solved this?

Previous:Maximum Book Overhang Next:Heat Flow


After having explored the maximum possible overhang with her pile of various mismatched books in the previous problem, Chris recalls the large reference section of the library deep in the basement. She unlocks a series of doors through winding hallways until reaching the expansive reference section, filled with shelves upon shelves of encyclopedias - each volume being all identical in length and width.

With all these books now available for use, Chris gets to work on building a truly large maximum total overhang.

Problem Statement

Input Data
First line will be L, the length of each book.
Second line will be Q, the quantity of testcases.
Q lines will then follow, each with a single integer n.

Answer
Should consist of Q space-separated values, corresponding to the maximum total overhang possible using n books in each testcase.

Example

input data:
1.234
3
1
5
975318642


answer:
0.617000 1.408817 13.126978
You need to login to get test data and submit solution.