CHEFTEAM - Editorial

PROBLEM LINKS

Practice
Contest

DIFFICULTY

EASY

EXPLANATION


SETTER’S SOLUTION

Can be found here.

TESTER’S SOLUTION

Can be found here.

9 Likes

please have a look at this code in which i got an AC (instead of wrong input format)

http://www.codechef.com/viewsolution/2186022
i submitted that code accidentally

http://www.proofwiki.org/wiki/Divide_by_GCD_for_Coprime_Integers

for anyone wondering a proof of the coprime’s by gcd division…

Can any1 help me with my solution getting run time error
[Solution][1]
[1]: CodeChef: Practical coding for everyone

Thank you for this editorial. Really these little concepts help a lot in improvement.

Thank you …It is good

I took this base code in C and wrote it in JAVA but its giving runtime error.
Any clues for the solution ?

just by writing
if(k>n-k)
k=n-k;
i got AC;
else if i write
if(2*k>n)
k=n-k;
i got TLE;
whats the logic behind it??

Yes, your code seem to be wrong. I guess another bug in test cases.

Please give your complete code. We will be in a better position to comment then.

can u please explain the solution .