Pascal :
var n,y:integer; begin readln(n,y); case y of 1,3,5,7,8,10,12:write('31'); 4,6,9,11:write('30'); end; if y=2 then if (n mod 4=0) and (n mod 100<>0) or (n mod 400=0) then write('29') else write('28'); end.
By signing up a 算道OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 算道OJ universal account