1 条题解

  • 0
    @ 2026-10-14 15:35:04

    #include <stdio.h> int main() { int t; int d; int n; scanf("%d", &n); int x; char T[10][5] = {"jia", "yi", "bing", "ding", "wu", "ji", "geng", "xin", "ren", "gui"}; char D[12][5] = {"zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen", "you", "xu", "hai"};

    x = n - 1984;
    while(x < 0) {
        x += 60;
    }
    
    t = x % 10;
    d = x % 12;
    
    printf("%s%s\n", T[t], D[d]);
    return 0;
    

    }

    • 1

    信息

    ID
    1674
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    提交数
    92
    已通过
    27
    上传者