pull down to refresh

This was my solution... I started writing code to solve it but ended up just manually trying different combinations and running the program to verify.
The first thing that occurred to me is that the first letters need to be small otherwise the answer is more than 4 digits. Then the hard part was making sure the O was the same in the answer as it was in the question.
const int L = 3; const int I = 2; const int O = 1; const int K = 6; const int D = 5; const int U = 7; const int N = 4; var LOKI = int.Parse($"{L}{O}{K}{I}"); var IDUN = int.Parse($"{I}{D}{U}{N}"); var ODIN = int.Parse($"{O}{D}{I}{N}"); var THOR = LOKI + IDUN + IDUN; Console.WriteLine($"LOKI + IDUN + ODIN = THOR"); Console.WriteLine($"{LOKI} + {IDUN} + {ODIN} = {THOR}");
And the result turned out to be...
LOKI + IDUN + ODIN = THOR 3162 + 2574 + 1524 = 8310
You used 3 for both L in LOKI and H in THOR.
reply
Ah, you're right, nicely spotted. It's harder than it looks. I guess my contribution is more of a starting point than a proper solution. If anyone fixes it I'll throw some extra sats into the pot.
reply