結果

問題 No.188 HAPPY DAY
ユーザー cccccc
提出日時 2022-08-24 18:27:22
言語 C#
(.NET 8.0.203)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 834 bytes
コンパイル時間 9,681 ms
コンパイル使用メモリ 167,748 KB
実行使用メモリ 183,348 KB
最終ジャッジ日時 2024-04-20 07:42:56
合計ジャッジ時間 10,298 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (95 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;


class Program
{
    static void Main()
    {
        var month = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };

        var _ans = 0;

        for (var i = 0; month.Count > i; i++)
        {
            foreach (var j in Enumerable.Range(1, 31))
            {
                var s = j.ToString();
                if (s.Length == 1)
                {
                    if (j == month[i]) _ans++;
                }
                else
                {
                    int a = (int)char.GetNumericValue(s[0]);
                    int b = (int)char.GetNumericValue(s[1]);
                    if (a + b == month[i]) _ans++;
                }
            }
        }
        Console.WriteLine(_ans - 1);
    }
}
0