結果

問題 No.188 HAPPY DAY
ユーザー reo85reo85
提出日時 2021-03-08 22:09:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 614 bytes
コンパイル時間 1,750 ms
コンパイル使用メモリ 164,224 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-04-18 18:16:07
合計ジャッジ時間 1,844 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int count = 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 > 27){
                break;
            }
            
            else if(i == 4 && j > 29 || i == 6 && j > 29 || i == 9 && j > 29 || i == 11 && j > 29){
                break;
            }
            
            else if(i == day[j]){
                count++;
            }
        }
    }
    cout << count << endl;
}
0