結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  tetsuzuki1115 | 
| 提出日時 | 2017-09-26 21:31:25 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 705 bytes | 
| コンパイル時間 | 1,017 ms | 
| コンパイル使用メモリ | 79,656 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-31 05:59:16 | 
| 合計ジャッジ時間 | 1,531 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 1 | 
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
int main() {
    
    int happy = 0;
    int x[4] = { 4,6,9,11 };
    
    for ( int m = 1; m <= 12; m++ ) {
        
        int D = m == 2 ? 28 : m == 4 || m == 6 || m == 9 || m == 11 ? 30 : 31;
        for ( int d = 1; d <= D; d++ ) {
            
            if ( to_string(d)[0] - '0' + to_string(d)[1] - '0' == m ) { happy++; }
            
        }
    }
    
    cout << happy << endl;
    
    return 0;
}
            
            
            
        