結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  sanntaroh | 
| 提出日時 | 2019-04-24 18:47:16 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 24 ms / 1,000 ms | 
| コード長 | 779 bytes | 
| コンパイル時間 | 937 ms | 
| コンパイル使用メモリ | 105,728 KB | 
| 実行使用メモリ | 17,920 KB | 
| 最終ジャッジ日時 | 2024-11-08 16:31:14 | 
| 合計ジャッジ時間 | 1,478 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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.Linq;
using System.Collections.Generic;
namespace test20190423
{
    class Program
    {
        static void Main(string[] args)
        {
            DateTime baseDay = new DateTime(2015, 1, 1);
            Func<string, int, int, int> cal = (s, n1, n2) => int.Parse(s.Substring(n1, n2));
            List<string> ss = new List<string>();
            for (int i = 0; i < 365; i++)
            {
                var s = (baseDay + new TimeSpan(i, 0, 0, 0)).ToString();
                if (cal(s, 5, 2) == cal(s, 8, 1) + cal(s, 9, 1))
                {
                    ss.Add(s);
                    //Console.WriteLine(s);
                }
            }
            Console.WriteLine(ss.Count);
            //Console.ReadLine();
        }
    }
}
            
            
            
        