Codeforces 1195D1-Submarine in the Rybinsk Sea (easy edition)
题目链接题意就不讲了,挺容易理解的思路找规律看出来的,就这组样例来说3123345总共九种组合,分别是f(12,12)=1122f(12,33)=1323f(12,45)=1425f(33,12)=3132f(33,33)=3333f(33,45)=3435f(45,12)=4152f(45,33)=4353f(45,45)=4455就12来说,12的个位,也就是2在个位上贡献了3次在十位贡献了3