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
Where does 0.0162 come from? How many Fn will this work? I'm at a complete loss as to how you go this number. thanks!
Left the game for some time
It's funny, that in my time I didn't find such a simple solution through rounding in the INT, but went into the wilderness of the REG. xD
Our task is to separate a specific remainder of division from the rest ones. In this case, we cut off all the wrong options in 2 steps.
1) We want to cut off half of the options by rounding (we will use the ability of the REG to round to 2 decimal places). So, we need to divide the number by 4 and we have to divide by another 100 to round result. Let's divide row {1, 2, 3, 4} by 400.
{1, 2, 3, 4} / 400 = {0.0025, 0.005, 0.0075, 0.01} (with rounding = {0, 0.01, 0.01, 0.01})
Not the best result, since we were only able to cut off one wrong number. But 0.005 is right on the edge of rounding. We can easily and without consequence make it round down.
{1, 2, 3, 4} / 401 = {0.0024.., 0.0049.., 0.0074.., 0.099..} (with rounding = {0, 0, 0.01, 0.01})
{0, 0, 0.01, 0.01} * 400 = {0, 0, 4, 4} (with INPUT = {1, 2, 3, 4})
If we compare the two sequences (REG = {0, 0, 4, 4} and INT = {1, 2, 3, 4}), we can already make a simple conclusion:
"REMAINDER = 3 if REG > INT"
Thus 400 is sufficient. But I didn't notice it at the time and put 399 to be sure. xD
Great guide!
I wanted to ask about the problem 12 . Some Leftovers
Why is used X/401 and then multiplied by 399? I get that it has to do with leaving the two significant decimals to round the number, but I fail to see why those numbers are used nor the maths behind...
Thank you in advance!
[code]
start:
reg = input / 4;
int = reg + 0.25;
check reg < int;
jump if false: start;
reg = reg * 4;
output = reg;
[/code]