Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Run only the first "Sample Tests" with in your code (just before your return):
and compare the expected result to your printing to see what is wrong in your code.
To avoid having a big gcd you should first simplify the fractions. On the other hand you could make this first calculation by hand to control your result.
Update: I added a small utility so that you can view your result and the expected result.