#include<stdio.h>
int main()
{
    int a,b,c;
    scanf("%4d%2d%2d",&a,&b,&c);
     printf("year=%d\nmonth=%02d\ndate=%02d\n",a,b,c);
}

注意输出那是%02d不是%2d刚开始没注意写作错了