牛客网BC13,BC14

在这里插入图片描述

#include<stdio.h>
int main()
{
    printf("%c", 73);
    printf("%c", 32);
    printf("%c", 99);
    printf("%c", 97);
    printf("%c", 110);
    printf("%c", 32);
    printf("%c", 100);
    printf("%c", 111);
    printf("%c", 32);
    printf("%c", 105);
    printf("%c", 116);
    printf("%c", 33);
    return 0;
}

#include<stdio.h>
int main()
{
    int time = 0;
    int year = 0;
    int month = 0;
    int date = 0;
    scanf("%d", &time);
    year = time / 10000;
    month = time % 10000 / 100;
    date = time % 100;
    printf("year=%d\n", year);
    if (month < 10)
        printf("month=0%d\n", month);
    else
        printf("month=%d\n", month);
    if (date < 10)
        printf("date=0%d\n", date);
    else
        printf("date=%d\n", date);

    return 0;
}
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 游动-白 设计师:上身试试 返回首页