結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2019-07-26 21:34:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 381 bytes |
コンパイル時間 | 1,648 ms |
コンパイル使用メモリ | 193,420 KB |
最終ジャッジ日時 | 2025-01-07 07:42:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main() {int day[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };int hd = 0;for (int m = 1; m <= 12; m++) {int nd = day[m-1];for (int d = 1; d <= nd; d++) {int sum = d / 10 + d % 10;if (m == sum) hd++;}}cout << hd << endl;}