Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The simple input cases were intentional. Just having a simple divide-by-two problem with the full range of values only has one good solution. By simplifying the cases, you can teach people to take advantage of certain mechanics without having to spoil it by directly explaining it to them.
It's also a good reason for leaving the problem as-is instead of expanding the set of signals to all even numbers between 0 and 100 inlusive. A more finely-grained input set would ruin that approach and effectively reduce this problem to one with a single optimal solution, whereas this has two solutions.
@Falco: That behavior of the ROM isn't documented. It's one of several features that you have to experiment with to figure out.
setting the address on a memory will truncate it to 13 if input > 13... is that in the manual?
This solution is 5/180/3.
When you send an address to the ROM module, it sets the address to [input modulo 14]. Since 0, 20, 40, 60, 80, and 100 (the only inputs that appear) all have a different result modulo 14, you can assign all those results to a ROM module. The three lines are 1) Mov input to ROM address 2) Mov ROM data to output 3) Slp 1. The ROM data, for those too lazy to do the modulo math, is {0,0,50,0,30,0,10,0,0,0,40,0,20,0}
It seems that many people have found the 6-line solution (not too hard). However, I want to challenge you all to find a 3-line solution (the one I've figured out after seeing that it was possible also used only 180 power) . I won't say too much about how to do it aside from saying that I was nicely surprised at the clever component use that enabled the 3-line solution . I had a good bit of a laugh on figuring out how my friend did it.
I just divided by 10 using dgt and then multiplied by 5 and had a special case for 100.
so basically I divided by 10, then multiplying by 5 instead of multiplying by 5 and then dividing by 10, which is saving the extra lines for the 100 case.
Hint: What do the inputs look like when multiplied by 5?