うるう年 is_uruu 時刻 C++

Quiz

https://yukicoder.me/problems/no/721

AC Code

https://yukicoder.me/submissions/355611

その他

  • C++で日時を扱うより、Pythonとかの方が楽
  • うるう年とか
  • 閏年の日だけ、カレンダーを書き換えると楽

Code

  • うるう年と、カレンダー
bool is_uruu(int y) {
    return (y % 4 == 0 && y % 100 != 0 || y % 400 == 0) ? true : false;
}

int cal[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};