All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Shapes
Cinq Confusion (Posted on 2014-07-10) Difficulty: 3 of 5
A farmer has two rectangular fields with a peculiar relationship. Both fields have integer dimensions. The corn field has five times the area of the hay field but the hay field has five times the perimeter of the corn field.

It is also known that the dimensions of the corn field differ by 1, and the shorter dimension of the hay field is less than 100.

Find the dimensions of the two fields.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 3 |
FOR cornwide = 1 TO 500
    cornlong = cornwide + 1
    cornarea = cornwide * cornlong
    IF cornarea MOD 5 = 0 THEN
        hayarea = cornarea / 5
        cornperio2 = cornwide + cornlong
        hayperio2 = 5 * cornperio2
        FOR haywide = 1 TO hayperio2 / 2
            haylong = hayperio2 - haywide
            IF haywide * haylong = hayarea THEN
                PRINT cornwide; cornlong, haywide; haylong
                PRINT 2 * (cornwide + cornlong); cornwide * cornlong,
                PRINT 2 * (haywide + haylong); haywide * haylong,
                _CLIPBOARD$ = STR$(cornwide) + STR$(cornlong) + "    " + STR$(haywide) + STR$(haylong) + CHR$(13) + CHR$(10)
                _CLIPBOARD$ = _CLIPBOARD$ + STR$(2 * (cornwide + cornlong)) + STR$(cornwide * cornlong)
                _CLIPBOARD$ = _CLIPBOARD$ + STR$(2 * (haywide + haylong)) + STR$(haywide * haylong)
            END IF
        NEXT
    END IF
NEXT

finds
dimensions:
  corn         hay
 249 250     5 2490
perimeter and area:
   corn         hay
 998 62250 4990 12450

Edited clipboard version of perimeter formula to add needed parentheses. Perimeters appeared correct on screen but added to clipboard for pasting here missed the needed parentheses.

Edited on July 10, 2014, 12:47 pm
  Posted by Charlie on 2014-07-10 11:55:08

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information