結果

問題 No.83 最大マッチング
ユーザー matsuyou1001matsuyou1001
提出日時 2020-01-03 09:10:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 467 bytes
コンパイル時間 798 ms
コンパイル使用メモリ 105,348 KB
実行使用メモリ 25,692 KB
最終ジャッジ日時 2024-05-02 07:04:49
合計ジャッジ時間 1,766 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
23,752 KB
testcase_01 AC 24 ms
23,520 KB
testcase_02 AC 25 ms
25,692 KB
testcase_03 AC 24 ms
23,856 KB
testcase_04 AC 24 ms
23,644 KB
testcase_05 AC 24 ms
23,388 KB
testcase_06 AC 24 ms
23,520 KB
testcase_07 AC 24 ms
23,644 KB
testcase_08 AC 24 ms
23,648 KB
testcase_09 AC 24 ms
23,388 KB
testcase_10 AC 24 ms
23,904 KB
testcase_11 AC 25 ms
23,336 KB
testcase_12 AC 24 ms
23,396 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 Program {
    static void Main(string[] args) {
        if (!int.TryParse(Console.ReadLine(), out var input))
            return;
        
        string output;
        if (input < 2) {
            output = "0";
        }
        else if (input % 2 == 0) {
            output = new string('1', input / 2);
        }
        else {
            output = "7" + new string('1', (input - 3) / 2);
        }

        Console.WriteLine(output);
    }
}
0