結果

問題 No.83 最大マッチング
ユーザー nanophoto12nanophoto12
提出日時 2014-12-03 00:04:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 744 bytes
コンパイル時間 3,752 ms
コンパイル使用メモリ 95,864 KB
実行使用メモリ 14,756 KB
最終ジャッジ日時 2023-09-02 01:17:09
合計ジャッジ時間 3,561 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
14,740 KB
testcase_01 AC 48 ms
14,700 KB
testcase_02 AC 49 ms
14,664 KB
testcase_03 AC 51 ms
14,588 KB
testcase_04 AC 48 ms
14,744 KB
testcase_05 AC 47 ms
14,616 KB
testcase_06 AC 47 ms
14,672 KB
testcase_07 AC 45 ms
14,756 KB
testcase_08 AC 47 ms
14,616 KB
testcase_09 AC 50 ms
14,668 KB
testcase_10 AC 49 ms
14,680 KB
testcase_11 AC 48 ms
14,700 KB
testcase_12 AC 51 ms
14,700 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Text;

class Program83
{
    public static void Main(string[] args)
    {
        var n = int.Parse(Console.ReadLine());
        if (n%2 == 1)
        {
            n -= 3;
            StringBuilder builder = new StringBuilder();
            builder.Append("7");
            for (int i = 0; i < n/2; i++)
            {
                builder.Append("1");
            }
            Console.WriteLine(builder.ToString());
        }
        else
        {
            StringBuilder builder = new StringBuilder();
            for (int i = 0; i < n / 2; i++)
            {
                builder.Append("1");
            }
            Console.WriteLine(builder.ToString());
        }
    }
}
0