0
votes

I'm writing a program that solves this problem:

http://acmph.blogspot.com/2010/12/usaco-prime-cryptarithm.html

I'm trying to write test cases to check my solution against. But coming up with the correct answer to a certain sample input would take a lot of time. So generally, when you write a program like this, what are some ways you can use to get around the large amount of time to decide on the correct answer?

Even if I did spend that time, there is a good chance that I went wrong somewhere so that leaves me with nothing to test against.

1

1 Answers

0
votes

Do you have a Range of values allowed? Generally, you should test boundaries and valid and invalid classes. Say your range goes from 1 to 100, then you shall test with -1, 0, 1 ,99,100,101 for example. You could also test with values such as -50,50,150. Divide values in valid and invalid classes, and you should be just fine.