結果

問題 No.83 最大マッチング
ユーザー swdamdrswdamdr
提出日時 2017-01-24 16:00:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,888 ms / 5,000 ms
コード長 528 bytes
コンパイル時間 1,914 ms
コンパイル使用メモリ 101,808 KB
実行使用メモリ 46,368 KB
最終ジャッジ日時 2023-08-24 21:46:19
合計ジャッジ時間 8,175 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
22,720 KB
testcase_01 AC 53 ms
20,668 KB
testcase_02 AC 53 ms
20,680 KB
testcase_03 AC 52 ms
22,668 KB
testcase_04 AC 52 ms
20,664 KB
testcase_05 AC 52 ms
20,680 KB
testcase_06 AC 52 ms
20,700 KB
testcase_07 AC 53 ms
20,628 KB
testcase_08 AC 52 ms
22,604 KB
testcase_09 AC 71 ms
44,928 KB
testcase_10 AC 1,012 ms
46,192 KB
testcase_11 AC 1,888 ms
44,316 KB
testcase_12 AC 1,888 ms
46,368 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.Linq;

class Program
{
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());
        string ans = "";

        while (true)
        {
            if (N == 0)
            {
                break;
            }

            if (N == 3)
            {
                ans = "7" + ans;
                N -= 3;
            }
            else
            {
                ans += "1";
                N -= 2;
            }
        }

        Console.WriteLine(ans);
    }
}
0