Write calculateWeight(formula) for formulas with C=12, H=1 and O=8, single-digit multipliers and no parentheses.
Unlock detailed company stats for this questionUpgrade
Example: CH4 returns 16.
Community answers
No answers contributed by the community yet.
Related questions
Extend the formula weight calculator to support nested parentheses with multipliers that apply to the whole group.Related courses

Course

Course
Course
