37
2
In the Anno video game series there are 6 games with a 7th one announced for early 2019. Their titles always feature a year in a specific pattern:
Anno 1602, Anno 1503, Anno 1701, Anno 1404, Anno 2070, Anno 2205, Anno 1800
- The digital sum is always 9.
- The years are four digits long.
- They contain at least one zero.
Within these constrains there exist 109 possible titles:
[1008,1017,1026,1035,1044,1053,1062,1071,1080,1107,1170,1206,1260,1305,1350,1404,1440,1503,1530,1602,1620,1701,1710,1800,2007,2016,2025,2034,2043,2052,2061,2070,2106,2160,2205,2250,2304,2340,2403,2430,2502,2520,2601,2610,2700,3006,3015,3024,3033,3042,3051,3060,3105,3150,3204,3240,3303,3330,3402,3420,3501,3510,3600,4005,4014,4023,4032,4041,4050,4104,4140,4203,4230,4302,4320,4401,4410,4500,5004,5013,5022,5031,5040,5103,5130,5202,5220,5301,5310,5400,6003,6012,6021,6030,6102,6120,6201,6210,6300,7002,7011,7020,7101,7110,7200,8001,8010,8100,9000]
Your objective is to list them all in any reasonable form in the fewest number of bytes.
How flexible is the output format? Is this acceptable?
– Luis Mendo – 2018-10-15T14:50:54.7831@LuisMendo Yes, that's fine with me. – Laikoni – 2018-10-15T14:54:48.360
Are lists of digits allowed?
– Erik the Outgolfer – 2018-10-15T18:18:28.513Are large numbers of spaces between number acceptable?
1008 1017 1035...
– aslum – 2018-10-15T18:59:27.9031@aslum I assume you mean a lot of spaces, not just one, right? Comment markdown doesn't allow for a good representation of that. And I would assume that's allowed, given that Luis's format above is allowed. ;-) – Erik the Outgolfer – 2018-10-15T20:20:07.810
Yeah, currently my code puts a space for every non-9-sum number... so 8 between the first and second result... 11 between third and fourth, and 899 spaces between last two... but as long as output goes to a standard web browser all duplicate spaces will be ignored, much like the spaces where ignored in my comment above. – aslum – 2018-10-15T20:22:56.080
1@EriktheOutgolfer I'd say no to lists of digits because they really do not look like years anymore. – Laikoni – 2018-10-15T21:50:51.793
@aslum Excessive spaces are fine. – Laikoni – 2018-10-15T21:51:19.747
Hmm I stopped around Anno 1404, my assumption was that the difference between the titles is always 99 but then it would have been 2097 and 2196... – Arsenal – 2018-10-16T15:24:45.577