牛客網BC13,BC14

BLANK-BLACK發表於2020-12-05

在這裡插入圖片描述

#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;
}