結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  MM | 
| 提出日時 | 2022-02-25 20:36:37 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 509 bytes | 
| コンパイル時間 | 628 ms | 
| コンパイル使用メモリ | 66,240 KB | 
| 実行使用メモリ | 6,812 KB | 
| 最終ジャッジ日時 | 2024-07-03 15:11:48 | 
| 合計ジャッジ時間 | 945 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
  int ans = 0;
  int month,dayten,dayone;
  // まずはi月j日(iは12以下,jは31以下)の372日について多重ループを組む
  for (int i=1;i<=12;i++){
    month = i;
    for (int j=1;j<=31;j++){
      dayten = j / 10;
      dayone = j % 10;
      if (month == dayten + dayone){
        ans++;
      }
    }
  }
  // コーナーケース(4月31日の除外)を処理
  ans--;
  cout << ans << endl;
  return 0;
}
            
            
            
        