Given a sequence of letters, write a program to construct it using symbols on the periodic table. For example, given the input bacon, the program should output:


Note that capitalization is important. Standard loopholes apply. If a word can't be formed, any error message may be printed.

Edit: All possible ways to make the sequence must be output.

  • \$\begingroup\$ I like the question, but I'd suggest expanding it a bit more to avoid cheap tactics. \$\endgroup\$ – ɐɔıʇǝɥʇuʎs Jul 16 '14 at 20:21
  • \$\begingroup\$ I read that challenge before posting mine; I believe that they use different algorithms. This one talks about permutations of symbols and the other can be solved with a pretty unsophisticated algorithm. In general, I think they have different intents. \$\endgroup\$ – APerson Jul 16 '14 at 20:30
  • \$\begingroup\$ @ɐɔıʇǝɥʇuʎs How would you suggest expanding the challenge? \$\endgroup\$ – APerson Jul 16 '14 at 20:46
  • \$\begingroup\$ I've edited the question to hopefully further distinguish it from the earlier one. \$\endgroup\$ – APerson Jul 16 '14 at 21:00

Browse other questions tagged or ask your own question.