結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  sorag | 
| 提出日時 | 2022-08-11 14:09:02 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 885 bytes | 
| コンパイル時間 | 608 ms | 
| コンパイル使用メモリ | 74,488 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-09-21 21:07:24 | 
| 合計ジャッジ時間 | 972 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#define all(x) x.begin(),x.end()
#define pb push_back
#define ll long long 
#define P pair<int,int>
#define LP pair<ll,ll>
using namespace std;
int main() {
	int d1[] = {1,3,5,7,8,10,12};
	int d2[] = {4,6,9,11};
	int cnt1 = 0, cnt2=0,cnt3=0;
	for (int i=0 ; i <7; i++) {
		for (int j=1;j<32;j++){
			int a = d1[i];
			if (j<10) {
				if (a == j) cnt1++;
			}
			else {
				if (a == j / 10 + j % 10) cnt1++;
			}
		}
	}
	for (int i = 0; i < 4; i++) {
		for (int j = 1; j < 31; j++) {
			int b = d2[i];
			if (j < 10) {
				if (b == j) cnt2++;
			}
			else {
				if (b == j / 10 + j % 10) cnt2++;
			}
		}
	}
		for (int j = 1; j < 29; j++) {
			if (j < 10) {
				if (2== j) cnt3++;
			}
			else {
				if (2 == j / 10 + j % 10) cnt3++;
			}
		}
	
    cout << cnt1+cnt2+cnt3 << endl;
	return 0;
}
            
            
            
        