Discussion:
A1P4 test cases
(too old to reply)
Dan Heidinga
2004-05-16 01:59:08 UTC
Permalink
Hi,

I worked out a few extra test cases for this problem, and thought I'd post
them if anyone wants them....

Input: 1 Output: 3
Input: 2 Output: 3
Input: 3 Output: 15
Input: 4 Output: 231
Input: 5 Output: 53391
Input: 6 Output: -1444367953
Input: 7 Output: -1769662785
Input: 8 Output: -867383841
Input: 9 Output: -1436342849

I generated it with Java, and the numbers match, so feel free to enjoy.

Dan
Felix Lo
2004-05-17 15:16:54 UTC
Permalink
Hi,

I'm wondering what we do with negative entries for n for a1p4? Maybe I
misread the question but can somebody clarify how are we suppose to handle
those again And what output they are suppose to generate?

Thanks,
Post by Dan Heidinga
Hi,
I worked out a few extra test cases for this problem, and thought I'd post
them if anyone wants them....
Input: 1 Output: 3
Input: 2 Output: 3
Input: 3 Output: 15
Input: 4 Output: 231
Input: 5 Output: 53391
Input: 6 Output: -1444367953
Input: 7 Output: -1769662785
Input: 8 Output: -867383841
Input: 9 Output: -1436342849
I generated it with Java, and the numbers match, so feel free to enjoy.
Dan
Troy Mark Gonsalves
2004-05-17 16:51:19 UTC
Permalink
The function is undefined for n<1 so we won't be testing for those values.

FYI: my code outputs 3 when you enter a value less than 1

Troy
Post by Felix Lo
Hi,
I'm wondering what we do with negative entries for n for a1p4? Maybe I
misread the question but can somebody clarify how are we suppose to handle
those again And what output they are suppose to generate?
Thanks,
Post by Dan Heidinga
Hi,
I worked out a few extra test cases for this problem, and thought I'd post
them if anyone wants them....
Input: 1 Output: 3
Input: 2 Output: 3
Input: 3 Output: 15
Input: 4 Output: 231
Input: 5 Output: 53391
Input: 6 Output: -1444367953
Input: 7 Output: -1769662785
Input: 8 Output: -867383841
Input: 9 Output: -1436342849
I generated it with Java, and the numbers match, so feel free to enjoy.
Dan
Loading...