結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2022-06-26 19:55:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 2,242 ms |
コンパイル使用メモリ | 192,508 KB |
最終ジャッジ日時 | 2025-01-30 00:58:38 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main () {int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};int count = 0;for (int i = 0; i < 12; i++) {for (int j = 0; j < days[i]; j++) {int a = (j + 1) / 10;int b = (j + 1) % 10;if (i + 1 == a + b) {count += 1;}}}cout << count << endl;}