結果

問題 No.188 HAPPY DAY
ユーザー mkawa2mkawa2
提出日時 2020-01-17 09:37:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 621 bytes
コンパイル時間 1,693 ms
コンパイル使用メモリ 164,728 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-07 21:20:00
合計ジャッジ時間 1,834 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
const ll inf = 1e16;
const ll md = 1000000007;

int main() {
  int ans=0;
  for(int m=1;m<=12;m++){
    for(int t=0;;t++){
      if(m-t>9) continue;
      if(m-t<0) break;
      int d=t*10+(m-t);
      if(m==2&&d>28) break; 
      else if((m==4||m==6||m==9||m==11)&&d>30) break; 
      else if(d>31) break; 
      ans++;
    }
  }
  cout<<ans<<endl;
  return 0;
}
0