結果

問題 No.188 HAPPY DAY
ユーザー ninoinuininoinui
提出日時 2020-01-20 21:00:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 401 bytes
コンパイル時間 1,435 ms
コンパイル使用メモリ 164,132 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-15 21:36:54
合計ジャッジ時間 1,779 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  struct tm t = {};
  t.tm_year = 2015;
  t.tm_mon = 0;
  t.tm_mday = 1;
  int ans = 0;
  for (int i = 0; i < 365; i++) {
    int d = t.tm_mday;
    if (t.tm_mon + 1 == d / 10 + d % 10) {
      // printf("%04d/%02d/%02d\n", t.tm_year, t.tm_mon + 1, t.tm_mday);
      ans++;
    }
    t.tm_mday++;
    mktime(&t);
  }
  cout << ans << "\n";
}
0