結果
問題 | No.188 HAPPY DAY |
ユーザー | outoforder |
提出日時 | 2017-07-22 00:40:37 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 56 ms / 1,000 ms |
コード長 | 772 bytes |
コンパイル時間 | 3,855 ms |
コンパイル使用メモリ | 99,484 KB |
実行使用メモリ | 20,524 KB |
最終ジャッジ日時 | 2023-08-29 22:38:53 |
合計ジャッジ時間 | 3,702 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace No188 { public class Program { public static void Main(string[] args) { DateTime n = new DateTime(2015, 1, 1); DateTime end = new DateTime(2015, 12, 31); int count = 0; while(n <= end ) { string day = n.Day.ToString("00"); int d0 = int.Parse(day[0].ToString()); int d1 = int.Parse(day[1].ToString()); if (n.Month == d0 + d1) { count++; } n = n.AddDays(1); } Console.WriteLine(count); } } }