結果

問題 No.83 最大マッチング
ユーザー Wataru MaedaWataru Maeda
提出日時 2018-10-03 20:28:44
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 706 bytes
コンパイル時間 741 ms
コンパイル使用メモリ 111,164 KB
実行使用メモリ 26,868 KB
最終ジャッジ日時 2024-04-20 14:49:38
合計ジャッジ時間 1,626 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
23,648 KB
testcase_01 AC 24 ms
23,852 KB
testcase_02 AC 24 ms
25,940 KB
testcase_03 AC 24 ms
21,820 KB
testcase_04 WA -
testcase_05 AC 23 ms
24,108 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Text;

namespace Problem083
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var ans = new StringBuilder();
            Process(n, ans);
            Console.WriteLine(ans);
            Console.ReadKey();
        }

        static void Process(int n, StringBuilder ans)
        {
            if (n >= 3 && n != 4)
            {
                ans.Append(7);
                n -= 3;
            } else if (n >= 2)
            {
                ans.Append(1);
                n -= 2;
            }
            if (n >= 2) Process(n, ans);
        }
    }
}
0