This is the first question of November-2016-long challenge.
Question link:-
Link to my code which gives 30 points:- https://www.codechef.com/viewsolution/21550890
Link to my code which gives 100 points: - https://www.codechef.com/viewsolution/21550940
In the first code, I wrote this to calculate lcm :
long long int lcm(long long int a,long long int b)
{
long long int z = (a*b)/gcd(a,b);
return z;
}
In the second code, I wrote this to calculate LCM :
long long int lcm(long long int a,long long int b)
{
return (a*b)/gcd(a,b);
}
why the Second one got AC and first one got WA for the last subtask?
Can anybody please explain?
@vijju
@admin