This topic is about the puzzle Chemical Equation Balancing.
Feel free to send your feedback or ask some help here!
This topic is about the puzzle Chemical Equation Balancing.
Feel free to send your feedback or ask some help here!
I already can think of a bruteforce approach.
Is there any other way ? Just want a yes or no
If bruteforce means trying every possible combination, then yes, there are other ways.
Yup so i am assuming a maximum value of a coefficient say 10.
And then I will try all values between 1-10 for all molecules on both sides of the equation.
OK, see if you can think of another way
Hey I just solved this puzzle of the week and dint get the achievement ? I havent gotten it before.
Nevermind. I got it 30 minutes later.
Hi !
Iām trying to solve this weekās puzzle.
I did manage to pass all the testcases, but canāt pass validator #6
I googled āPotassium tetrachloroplatinateā and found an equation (2K2PtCl6 + N2H6Cl2 -> 2K2PtCl4 + 6HCl + N2).
My code is able to balance this one too. But is it the right one ?
No, the validator has Potassium tetrachloroplatinate on the left side of the equation and combines it with some Hydrocarbon.
Hi. I passed all the tests but not the first validator (āHydrogen Peroxideā). I am not sure what I am missing. Could I get a hint? Thanks.
Look for the equation on the wikipedia page of hydrogen peroxide, and test if your code produces the correct output.
Ah! Got it. It was elementary. It works now. I missed a case. Thanks at lot.
Fun puzzle.
Is it this one : K2PtCl4 + H2 ?
Edit : no, my code manages to balance this one too
I am also still struggling with that specific validator.
While looking around for other possible reactions, though, I discovered a bug in my code whereas I was counting atoms in the wrong way in some cases; it might be your case. For example, consider the Glycolic Acid that has brute formula HOCH2COOH, having multiple occurrences of the same kind of atom inside the same molecule! There is no visible testcase with this, I donāt know about validator 6 (it didnāt work for me though).
Thanks mate for the hint !
I didnāt know we could have molecules with the same atom several times.
I changed the script but i still canāt pass validator 6
You can test any testcase in the ācustomā tab (display it via settings > expert mode while youāre in a practice)
polettix found a test that he would fail.
I added it as 8th testcase to the puzzle, please try that test too.
I was working on the same one (CuSO4H2O -> CuSO4 + H2O)
Edit : That was the inner problem ! Thanks a lot for the help and the nice puzzle !
Done, it works here.
Hello,
Iām working on this puzzle. My program is able to pass all the tests (including the #8) but I only get % of success.
I fail on the āPotassium tetrachloroplatinateā test. Can I have an hint? (I already fix the āidentical atoms in same moleculeā problem)
Thank you!
Not sure how to provide any specific hints. Some general ones though:
I have added another test case regarding the proper parsing of āsimilarā elements (e.g. Cu / Cl / C), since previously only one validator (and no other test cases) touches on this issue.