結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-03-21 17:51:19 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 0 ms / 1,000 ms | 
| コード長 | 530 bytes | 
| コンパイル時間 | 192 ms | 
| コンパイル使用メモリ | 21,120 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-11 23:17:57 | 
| 合計ジャッジ時間 | 456 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
#include <stdio.h>
int
main(int argc, char *argv[])
{
    int num_days_in_month[] = { /* 2015 */
        31, 28, 31, 30, 31, 30,
        31, 31, 30, 31, 30, 31
    };
    int month, date, num_happy_days = 0;
    for (month = 1; month <= 12; month++) {
        for (date = 1; date <= num_days_in_month[month-1]; date++) {
	    int d1, d10;
            d1  = date % 10;
            d10 = date / 10;
            if (month == (d1 + d10)) { num_happy_days++; }
        }
    }
    printf("%d\n", num_happy_days);
    return 0;
}
            
            
            
        