834 - Continued Fractions
Moderator: Board moderators
numerator / denominator == a whole number ???
I get ACC even without considering the case when numerator / denominator is a whole number. My program crashes on this input. So, there may not be such a case.
Re: 834 - Continued Fractions
I agree with nymo, I could modify my program to handle special cases where the numerator / denominator is a whole number but I decided to give it a shot first. AC in first try. My program would get Runtime Error if there were such cases. Very simple problem, you should get AC if the sample output matches as there are no special cases.
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson
Re: 834 - Continued Fractions
These are some great test cases! Thanks for sharing.Timo wrote: I have create random sample input and output from my AC program.
Hope it help you.
Re: 834 - Continued Fractions
Don't know why getting TLE...! Tested all the inputs by timo...
here's my code... plz help...
here's my code... plz help...
![:cry:](./images/smilies/icon_cry.gif)
Code: Select all
Got AC...
Last edited by axelblaze on Fri Oct 10, 2014 1:31 pm, edited 1 time in total.
Re: 834 - Continued Fractions
It is more safe to read this way.
Code: Select all
while (scanf("%d %d", &a, &b) == 2)
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Re: 834 - Continued Fractions
Thanks I got AC... ![:)](./images/smilies/icon_smile.gif)
![:)](./images/smilies/icon_smile.gif)