結果
問題 | No.188 HAPPY DAY |
ユーザー |
![]() |
提出日時 | 2018-09-18 22:35:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 601 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 63,772 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-07-18 08:06:28 |
合計ジャッジ時間 | 777 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <iostream>using namespace std;static void setup(){cin.tie(0);ios::sync_with_stdio(false);}static void run(){static int kDays[] = {31, 28, 31, 30, 31, 30,31, 31, 30, 31, 30, 31,};auto n = 0;for (auto m = 1; m <= 11; ++m) { // 12月は無理for (auto l = 0; l <= 3; ++l) {auto r = m - l;if (r >= 0 && r < 10 && (l * 10 + r <= kDays[m - 1])) {n += 1;}}}cout << n << endl;}int main(int argc, char **argv){setup();run();return 0;}