結果

問題 No.188 HAPPY DAY
ユーザー unno211unno211
提出日時 2020-12-10 16:06:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 510 bytes
コンパイル時間 1,485 ms
コンパイル使用メモリ 168,620 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 00:46:16
合計ジャッジ時間 1,897 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main(void)
{
  int ans = 0;
  vector<int> day = {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4};
  for (int i = 1; i <= 12; i++)
  {
    for (int j = 0; j < day.size(); j++)
    {
      if (i == 2 && j >= 29)
        break;
      if (i == 4 && j>=30 || i == 6 && j>=30 || i == 9 && j>=30 || i == 11 && j >= 30)
        break;
      if (i == day[j])
        ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
0