結果

問題 No.188 HAPPY DAY
ユーザー zn_kiezn_kie
提出日時 2019-06-23 23:01:10
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 364 bytes
コンパイル時間 663 ms
コンパイル使用メモリ 54,496 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-12-29 15:24:43
合計ジャッジ時間 998 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
    int ans = 0;
    for (int month = 1; month <= 12; month++)
    {
        for (int day = 1; day <= 31; day++)
        {
            if ((day / 10 + day % 10) == month)
            {
                ans++;
            }
        }
    }
    // 4/31の分を引く
    cout << ans - 1 << endl;
    return 0;
}
0