結果

問題 No.83 最大マッチング
ユーザー cccccc
提出日時 2022-09-01 15:45:22
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 758 bytes
コンパイル時間 9,718 ms
コンパイル使用メモリ 166,308 KB
実行使用メモリ 185,220 KB
最終ジャッジ日時 2024-04-26 17:21:30
合計ジャッジ時間 11,269 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
30,080 KB
testcase_01 AC 54 ms
29,952 KB
testcase_02 AC 55 ms
29,952 KB
testcase_03 AC 55 ms
30,336 KB
testcase_04 AC 56 ms
30,080 KB
testcase_05 AC 54 ms
29,824 KB
testcase_06 AC 55 ms
30,080 KB
testcase_07 AC 55 ms
29,932 KB
testcase_08 AC 56 ms
29,824 KB
testcase_09 AC 56 ms
29,952 KB
testcase_10 AC 68 ms
31,616 KB
testcase_11 AC 71 ms
32,256 KB
testcase_12 AC 70 ms
185,220 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /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()
    {
        /*
         * 0 : 6
         * 1 : 2
         * 2 : 5
         * 3 : 5
         * 4 : 4
         * 5 : 5
         * 6 : 6
         * 7 : 3
         * 8 : 7
         * 9 : 6
         */
        var N = int.Parse(Console.ReadLine());

        var _ansList = new List<long>();

        while(N != 0)
        {
           if (N % 2 == 0)
            {
                N = N - 2;
                _ansList.Add(1);
            }
            else
            {
                N = N - 3;
                _ansList.Add(7);
            }
        }
        Console.WriteLine(String.Join("",_ansList));

    }
}
0