結果

問題 No.188 HAPPY DAY
ユーザー soragsorag
提出日時 2022-08-11 14:02:43
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 889 bytes
コンパイル時間 825 ms
コンパイル使用メモリ 74,736 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 19:36:30
合計ジャッジ時間 1,215 ms
ジャッジサーバーID
(参考情報)
judge9 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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*7+cnt2*4+cnt3 << endl;

	return 0;
}



0