結果

問題 No.188 HAPPY DAY
ユーザー Ken-tofuKen-tofu
提出日時 2018-07-12 21:55:26
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 531 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 54,952 KB
実行使用メモリ 6,812 KB
最終ジャッジ日時 2024-04-15 01:25:29
合計ジャッジ時間 807 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>

int dayamount(int month){
    switch(month){
        case 2:
            return 28;
        case 4:
        case 6:
        case 9:
        case 11:
            return 30;
        default:
            return 31;
    }
}

int main(){
    int month;
    int count = 0;
    for(month = 0; month <13; ++month){
        for(int i = 1; i < (dayamount(month)+1); ++i){
            if(month == (i%10 + i/10)){ 
                count++;
            }
        }
    }
    std::cout << count << std::endl;
    return 0;
}
0