結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
outoforder
|
| 提出日時 | 2017-07-22 00:40:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 1,000 ms |
| コード長 | 772 bytes |
| コンパイル時間 | 825 ms |
| コンパイル使用メモリ | 110,860 KB |
| 実行使用メモリ | 24,216 KB |
| 最終ジャッジ日時 | 2024-12-31 01:52:10 |
| 合計ジャッジ時間 | 1,247 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / 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;
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);
}
}
}
outoforder