結果

問題 No.188 HAPPY DAY
ユーザー commycommy
提出日時 2018-02-26 14:58:03
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 494 bytes
コンパイル時間 1,415 ms
コンパイル使用メモリ 63,552 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-15 11:09:00
合計ジャッジ時間 803 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>

#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define dump(s) cerr << __LINE__ << "\t:" << #s << " = " << (s) << endl \
    
using namespace std;

int main () {
    int dlist[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    int ans = 0;
    REP (i, 0, 12) {
	int month = i + 1;
	REP (date, 1, dlist[i] + 1) {
	    if ((date % 10) + (date / 10) == month) {
		ans++;
		// dump(date);
		// dump(month);
	    }
	}
    }
    cout << ans << endl;
    return 0;
}
0