結果
問題 | No.188 HAPPY DAY |
ユーザー | p_nix |
提出日時 | 2018-01-23 17:10:40 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 49 ms / 1,000 ms |
コード長 | 617 bytes |
コンパイル時間 | 4,045 ms |
コンパイル使用メモリ | 99,040 KB |
実行使用メモリ | 20,516 KB |
最終ジャッジ日時 | 2023-08-30 01:52:55 |
合計ジャッジ時間 | 3,580 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace _188 { class Program { static void Main(string[] args) { DateTime a = new DateTime(2015, 1, 1); DateTime b = new DateTime(2016, 1, 1); int cnt = 0; while (a<b) { int m = a.Month; int d = a.Day; int d1 = d / 10; int d2 = d % 10; if (m == d1 + d2) { cnt++; } a = a.AddDays(1); } Console.WriteLine(cnt); } } }