結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-08-17 11:59:50 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 31 ms / 1,000 ms | 
| コード長 | 635 bytes | 
| コンパイル時間 | 2,166 ms | 
| コンパイル使用メモリ | 109,364 KB | 
| 実行使用メモリ | 23,224 KB | 
| 最終ジャッジ日時 | 2024-11-26 08:27:36 | 
| 合計ジャッジ時間 | 2,918 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Program
{
    static void Main()
    {
		//2015/1/1 取得 変数a
		//2016/1/1 取得 変数b
		//
		// 日付と時刻を格納するための変数を宣言する
    DateTime dtBirth = DateTime.Parse("2015/01/01");
	DateTime dtBirthB = DateTime.Parse("2016/01/01");
	int a = 0;
	int b = 0;
	int sumA = 0;
	int cnt=0;
	
	
    // 8 日加算する
    	while(dtBirth < dtBirthB){
    		a = dtBirth.Day % 10;
    		b = dtBirth.Day /10;
			sumA = a + b;    		
    		if(dtBirth.Month == sumA){
    			cnt++;
    		}
    		dtBirth = dtBirth.AddDays(1);
    		
		
    	}
    	Console.WriteLine(cnt);
    }
}
            
            
            
        