6 kyu
One Line Task: Largest Rectangle
208 of 260myjinxin2015
Description:
Task
Among all rectangles that have a perimeter of p
, find the dimensions of the one whose area is the largest. Returns its height and width as [height,width]
.
Code Limit
Strictly less than:
26
characters in JavaScript47
characters in PHP
Example
For p = 100
, the output should be [25,25]
.
For p = 10
, the output should be [2.5,2.5]
.
Puzzles
Restricted
Similar Kata:
Stats:
Created | Apr 26, 2017 |
Published | Apr 26, 2017 |
Warriors Trained | 523 |
Total Skips | 15 |
Total Code Submissions | 3757 |
Total Times Completed | 260 |
JavaScript Completions | 208 |
PHP Completions | 73 |
Total Stars | 8 |
% of votes with a positive feedback rating | 93% of 97 |
Total "Very Satisfied" Votes | 85 |
Total "Somewhat Satisfied" Votes | 10 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 6 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |