I am new to codechef and am practicing questions. I am struck at one ques (code is written in java)
My logic is:
first I found sum of two nos .
now I fetched last digit of the sum . now i eliminated that last digit I fetched by dividing it by 10. and it continues till each digit of sum gets analyzed. whenever each digit is fetched matches required to form it are also stored.
The program executes successfully and it produces the desired results but I don’t know why it still says wrong solution.
Edit: I am so sorry for wrong link. I have updated it
It is correct and accepted solution. Where are you seeing WA ?
It still says wrong answer. I am not allowed to share a screenshot since I am a new user.
You can share anything of a problem if it is not from an ongoing contest
Now I noticed that is not your code. Share your code correctly.
For “0” you need 6 matches
The submission link is of a submission you have mentioned is by some other user, Please check the link once again.
Why is the submission of another user linked under “My attempt” ?
To make zero we need 6 sticks, you are using 4.
using namespace std;
long long int a,b,r,count=0,sum;
} hope u find the result
oh yes. thanks
Thank you so much guys . It was a very silly mistake from my side .You all were so ready to help Thank you. Also I am very sorry for wrong link . I am newbie in programming and to this site and will try to avoid such blunders.