結果

問題 No.83 最大マッチング
ユーザー nanophoto12nanophoto12
提出日時 2014-12-02 23:58:24
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 2,134 ms / 5,000 ms
コード長 615 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 99,240 KB
実行使用メモリ 48,336 KB
最終ジャッジ日時 2023-09-02 01:14:13
合計ジャッジ時間 8,781 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,756 KB
testcase_01 AC 54 ms
20,776 KB
testcase_02 AC 53 ms
18,612 KB
testcase_03 AC 54 ms
20,712 KB
testcase_04 AC 55 ms
20,692 KB
testcase_05 AC 55 ms
22,736 KB
testcase_06 AC 53 ms
20,768 KB
testcase_07 AC 55 ms
22,884 KB
testcase_08 AC 54 ms
22,724 KB
testcase_09 AC 72 ms
42,944 KB
testcase_10 AC 1,160 ms
48,336 KB
testcase_11 AC 2,134 ms
44,372 KB
testcase_12 AC 2,132 ms
46,324 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

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