Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @ethaneCH3CH3,validated by @TBali,@Ayza and @TimesCantCode.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @ethaneCH3CH3,validated by @TBali,@Ayza and @TimesCantCode.
If you have any issues, feel free to ping them.
Good fun puzzle.
A hint for anyone getting stuck with some of the tests;
Note that the number of oxygen atoms is limited to those in the noted functional groups
(i.e. one for -anol / -anal / -anone, and two for -anoic acid)
So I have a problem with the explanations about how we are supposed to sort the molecules.
The problem is that there are rules not indicated in the rules, like for Ketones, you need a third carbon, or Alcohols can only have one hydroxyl group.
Can you fix it please ?
Ketone (also known as alkanone) contains 2n hydrogen atoms.
Thank you for your feedback.
For ketones, the constraint section of the puzzle already covers that n (the number of carbon atoms) must be more than or equal to 3.
For alcohols, I have already stated in the statement:
Alcohol contains a -OH group…
I hope that helps! ![]()
I do not see a constraint that Ketones require 3 or more Carbon. In fact, the third example states that the molecule could be a Ketone because it contains 2 carbon and 4 hydrogen.
Then it follows with not being a Ketone because there are 2 oxygen… but there is no Oxygen constraint listed above for Ketones. What is the Oxygen constraint for Ketones?
Also “contains a -OH group at the end”:
If the final OH is the only OH allowed, please be more precise.
I had to add extra conditions to pass some OTHERS cases in the initial tests, as the rules did not clarity:
Maybe make that more obvious?
Hello there,
In the constraint part of the statement, it clearly states that:
If the organic compound is a ketone, n ≥ 3
In the Goal section of the statement, it tells you that the carbonyl group (-CO-) appears exactly once:
The carbonyl functional group -CO- appears in the middle of the chemical formula exactly ONCE.
Also, there is a statement in bold stating that the oxygen atoms only come from the functional group:
Please note that the total number of oxygen atoms would NOT exceed those present in the functional group in this problem.
As this is a puzzle, I would like to encourage coders to think, rather than simply giving the answers.
Hopefully this helps you understand this problem a bit more!
Regarding the -OH tests, I have added a line to clarify the problem:
For the sake of simplicity, output OTHERS if the organic compounds contain more than one functional group. For instance, you should output OTHERS for the compound HOCH2OH.
Hello,
Regarding your second bullet point, there is a line in bold stating that the oxygen atoms only comes from the functional group:
Please note that the total number of OXYGEN atoms would NOT exceed those present in the functional group in this problem.
Hopefully that helps!
what is a functional group?
Functional group is a part of a compound that defines what type of compound it is. For example, if a compound contains the -OH functional group (e.g. CH3CH2OH), it is an alcohol. For other types of functional group, please check the statement of the problem.
hope that helps!