結果

問題 No.188 HAPPY DAY
ユーザー yumaruyumaru
提出日時 2019-05-29 16:03:26
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 839 bytes
コンパイル時間 611 ms
コンパイル使用メモリ 57,368 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 18:42:15
合計ジャッジ時間 1,092 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include<vector>
using namespace std;

int main(void) {

	int i,count=0,a,b;
	
	for (i = 1; i <= 31; i++) {
		int ai;
		ai = i / 10 + i - (i/10)*10;
		if (ai == 1) {
			count += 1;
		}
		else if (ai == 3){
			count += 1;
		}
		else if(ai == 5) {
			count += 1;
		}
		else if (ai == 7) {
			count += 1;
		}
		else if (ai == 10) {
			count += 1;
		}
		else if (ai == 8) {
			count += 1;
		}
		else if (ai == 12) {
			count += 1;
		}

		

	}
	for (a = 1; a <= 30; a++) {
		int ka;
		ka = a / 10 + a - (a / 10 )* 10;
		if (ka == 4) {
			count += 1;
		}
		else if (ka == 6) {
			count += 1;
		}
		else if (ka == 9) {
			count += 1;
		}
		else if (ka == 11) {
			count += 1;
		}
	}
	for (b = 1; b <= 28; b++) {
		int sb;
		sb = b / 10 + b - (b / 10) * 10;
		if (sb == 2) {
			count += 1;
		}
	}
	
	cout << count;
	return 0;
}
0