結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
commy
|
| 提出日時 | 2018-02-26 14:58:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 494 bytes |
| コンパイル時間 | 532 ms |
| コンパイル使用メモリ | 64,720 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-23 17:43:23 |
| 合計ジャッジ時間 | 850 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#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;
}
commy