結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー commy
提出日時 2018-02-26 14:58:03
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 199µs
コード長 494 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 308 ms
コンパイル使用メモリ 76,088 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-09-28 17:38:46
合計ジャッジ時間 1,098 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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