P8738 [蓝桥杯 2020 国 C] 天干地支 题解
2044 年为一个轮回的起点即甲子年,60年一轮回,而
int main() {
dR(int, n);
n = (n + 56) % 60;
const char *heaven[]{"jia", "yi", "bing", "ding", "wu", "ji", "geng", "xin", "ren", "gui"},
*earth[]{"zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen", "you", "xu", "hai"};
writeln(heaven[n % 10], earth[n % 12]);
return 0;
}