結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-23 17:10:40 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 1,000 ms |
| コード長 | 617 bytes |
| コンパイル時間 | 1,064 ms |
| コンパイル使用メモリ | 109,172 KB |
| 実行使用メモリ | 23,728 KB |
| 最終ジャッジ日時 | 2024-12-31 06:49:20 |
| 合計ジャッジ時間 | 1,610 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;
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);
}
}
}