Problem Statement
Elwood has a little sister named Casey. Although being quite young, Casey not only likes Modern Art, but also creates little pieces of art by herself. Her latest favorites are drawings on squared paper. She wants her new creations to be composed of only one basic shape that is used in all orientations:

[Image showing Casey's basic shape in all orientations.]
She draws her shapes into rectangles on her paper. For a rectangle of a given size, she wants to fill the entire rectangle in all different ways. Elwood immediately recognizes that even for small rectangles there might be many different fillings. But Casey, like little sisters sometimes do, doesn't believe him, so she asks you to exactly calculate how many drawings she has to do for a rectangle of a given size.

[Image showing all four possible fillings of a 3x4 rectangle.]
Given an
Definition
- Class:
- CaseysArt
- Method:
- howManyWays
- Parameters:
- int, int
- Returns:
- double
- Method signature:
- double howManyWays(int length, int width)
- (be sure your method is public)
Notes
- Reminder:If your result is within 10-9 of the expected result, your solution will be evaluated as correct.If your result is between (1+10-9)*expected and (1-10-9)*expected, it will be evaluated as correct.
Constraints
- length will be between 1 and 18, inclusive.
- width will be between 1 and 15, inclusive.
Examples
3
4
Returns: 4.0
This is the rectangle shown in the problem description.
4
3
Returns: 4.0
This is the rectangle shown in the problem description rotated.
2
2
Returns: 0.0
A rectangle of size 2x2 can't be filled.
5
9
Returns: 384.0
1
1
Returns: 0.0
1
2
Returns: 0.0
1
3
Returns: 0.0
1
12
Returns: 0.0
2
3
Returns: 2.0
2
4
Returns: 0.0
2
9
Returns: 8.0
2
12
Returns: 16.0
3
2
Returns: 2.0
3
12
Returns: 64.0
4
12
Returns: 468.0
5
8
Returns: 0.0
6
2
Returns: 4.0
6
6
Returns: 162.0
6
11
Returns: 39088.0
7
4
Returns: 0.0
7
15
Returns: 1.15363072E8
8
1
Returns: 0.0
8
3
Returns: 16.0
8
9
Returns: 204184.0
8
12
Returns: 2.9986082E7
9
2
Returns: 8.0
9
3
Returns: 0.0
9
9
Returns: 1193600.0
9
11
Returns: 6.3112256E7
10
9
Returns: 9567192.0
10
11
Returns: 0.0
10
12
Returns: 7.75880967E9
11
9
Returns: 6.3112256E7
11
11
Returns: 0.0
11
12
Returns: 1.24693887784E11
12
6
Returns: 118586.0
12
12
Returns: 2.033502499954E12
13
2
Returns: 0.0
13
6
Returns: 361712.0
13
9
Returns: 3.245128576E9
13
12
Returns: 3.3128240650256E13
14
3
Returns: 128.0
14
5
Returns: 0.0
14
6
Returns: 1103946.0
14
9
Returns: 2.3378489272E10
14
11
Returns: 0.0
14
12
Returns: 5.38556346650082E14
15
11
Returns: 2.33712926959296E14
15
12
Returns: 8.7786436827666E15
15
13
Returns: 3.281779116794919E17
15
15
Returns: 4.583240929968676E20
16
15
Returns: 1.7126367065533525E22
17
13
Returns: 0.0
17
15
Returns: 6.401450746057415E23
18
6
Returns: 1.0153017E8
18
9
Returns: 5.9141914295736E13
18
12
Returns: 3.79195817400869E19
18
13
Returns: 3.252838833028188E21
18
14
Returns: 2.7869302738761328E23
18
15
Returns: 2.393036288950159E25
18
15
Returns: 2.393036288950159E25
3
4
Returns: 4.0
5
9
Returns: 384.0
15
15
Returns: 4.583240929968676E20
6
8
Returns: 1514.0
12
12
Returns: 2.033502499954E12
4
6
Returns: 18.0
9
9
Returns: 1193600.0
13
15
Returns: 3.281779116794919E17