結果
問題 | No.188 HAPPY DAY |
ユーザー | Outing_Island |
提出日時 | 2019-06-22 10:23:52 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 437 bytes |
コンパイル時間 | 439 ms |
コンパイル使用メモリ | 57,864 KB |
実行使用メモリ | 4,376 KB |
最終ジャッジ日時 | 2023-08-27 02:42:17 |
合計ジャッジ時間 | 844 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
ソースコード
#include <iostream> #include <vector> //#include <iomanip> using namespace std; int main() { const int monthCnt = 12; const vector<int> monthDays = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, }; int cnt = 0; for (int month = 1; month <= monthCnt; month++) { for (int day = 1; day <= monthDays.at(month - 1); day++) { if (month == (day / 10) + (day % 10)) cnt++; } } cout << cnt << endl; return 0; }