#include<stdio.h>
typedef struct{
int year;
int month;
int day;
}Date;
Date input_date( Date ymd );
int isLeap( Date days );
int main(void)
{
Date date;
date = input_date( date );
if( isLeap( date ) )
{
printf("%d/%d/%d is a leap.\n", date.
year, date.
month, date.
day ); }
return 0;
}
Date input_date( Date ymd )
{
return ymd;
}
int isLeap( Date days )
{
return ( days.year%4 == 0 && days.year%100 != 0 || days.year%400 == 0 );
}
I2luY2x1ZGU8c3RkaW8uaD4KCnR5cGVkZWYgc3RydWN0ewppbnQgeWVhcjsKaW50IG1vbnRoOwppbnQgZGF5Owp9RGF0ZTsKCkRhdGUgaW5wdXRfZGF0ZSggRGF0ZSB5bWQgKTsKaW50IGlzTGVhcCggRGF0ZSBkYXlzICk7CgppbnQgbWFpbih2b2lkKQp7CkRhdGUgZGF0ZTsKCmRhdGUgPSBpbnB1dF9kYXRlKCBkYXRlICk7CgppZiggaXNMZWFwKCBkYXRlICkgKQp7CnByaW50ZigiJWQvJWQvJWQgaXMgYSBsZWFwLlxuIiwgZGF0ZS55ZWFyLCBkYXRlLm1vbnRoLCBkYXRlLmRheSApOwp9CnJldHVybiAwOwp9CgpEYXRlIGlucHV0X2RhdGUoIERhdGUgeW1kICkKewpwcmludGYoInllYXIgOiAiKTsgc2NhbmYoIiVkIiwgJnltZC55ZWFyICk7CnByaW50ZigibW9udGggOiAiKTsgc2NhbmYoIiVkIiwgJnltZC5tb250aCApOwpwcmludGYoImRheSA6ICIpOyBzY2FuZigiJWQiLCAmeW1kLmRheSApOwoKcmV0dXJuIHltZDsKfQoKaW50IGlzTGVhcCggRGF0ZSBkYXlzICkKewpyZXR1cm4gKCBkYXlzLnllYXIlNCA9PSAwICYmIGRheXMueWVhciUxMDAgIT0gMCB8fCBkYXlzLnllYXIlNDAwID09IDAgKTsKfQoK