import std.stdio, std.conv, std.range, std.array, std.algorithm; int main() { auto I = 12.iota().map!(HappyDays)().array().sum; I.writeln(); return 0; } int HappyDays(int mon){ auto day = [31,28,31,30,31,30,31,31,30,31,30,31][mon].iota().map!("a+1"); return day.map!("a/10 + a%10").count(mon+1).to!int(); }