結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-04-22 22:08:41 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 515 bytes | 
| コンパイル時間 | 612 ms | 
| コンパイル使用メモリ | 59,256 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-30 20:10:33 | 
| 合計ジャッジ時間 | 1,006 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 1 | 
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
const int SIZE = 13;
const int days[SIZE] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int calc(int n) {
	return n / 10 + n % 10;
}
int main() {
	int happy = 0;
	for (int i = 1; i < SIZE; i++) {
		int val_m = calc(i);
		for (int j = 1; j <= days[i]; j++) {
			if (calc(j) == val_m) {
				happy++;
				// printf("%02d/%02d\n", i, j);
			}
		}
	}
	cout << happy << endl;
	return 0;
}
            
            
            
        