結果

問題 No.83 最大マッチング
ユーザー NoNo
提出日時 2015-06-10 18:37:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,980 ms / 5,000 ms
コード長 1,258 bytes
コンパイル時間 1,990 ms
コンパイル使用メモリ 104,736 KB
実行使用メモリ 46,140 KB
最終ジャッジ日時 2023-09-20 20:34:37
合計ジャッジ時間 8,340 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
20,792 KB
testcase_01 AC 52 ms
20,576 KB
testcase_02 AC 51 ms
20,708 KB
testcase_03 AC 51 ms
20,572 KB
testcase_04 AC 51 ms
20,804 KB
testcase_05 AC 52 ms
20,764 KB
testcase_06 AC 53 ms
22,760 KB
testcase_07 AC 51 ms
20,656 KB
testcase_08 AC 52 ms
20,616 KB
testcase_09 AC 70 ms
42,808 KB
testcase_10 AC 971 ms
46,140 KB
testcase_11 AC 1,852 ms
44,164 KB
testcase_12 AC 1,980 ms
46,108 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

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

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

            while (N > 0)
            {
                ans += "1";
                N -= 2;
            }
            Console.WriteLine(ans);
        }


        //-------------------------------------------------------------

        static int[] ConvertStringArrayToIntArray(string[] str)
        {
            int[] b = Array.ConvertAll<string, int>(str, delegate(string value)
                {
                    return int.Parse(value);
                });
            return b;
        }

        static List<int> ConvertStringArrayToIntList(string[] str)
        {
            var list = new List<int>();
            foreach (var c in str)
            {
                list.Add(int.Parse(c));
            }
            return list;
        }
    }
}
0