結果

問題 No.83 最大マッチング
ユーザー bayashiko_rbayashiko_r
提出日時 2018-11-08 01:16:52
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 634 bytes
コンパイル時間 1,889 ms
コンパイル使用メモリ 60,972 KB
実行使用メモリ 46,212 KB
最終ジャッジ日時 2023-08-13 04:14:39
合計ジャッジ時間 8,456 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,732 KB
testcase_01 WA -
testcase_02 AC 53 ms
22,700 KB
testcase_03 WA -
testcase_04 AC 53 ms
22,720 KB
testcase_05 WA -
testcase_06 AC 54 ms
20,676 KB
testcase_07 WA -
testcase_08 AC 53 ms
22,752 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2,100 ms
44,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

class Program {
    static void Main(string[] args) {
        //入力
        ulong N = ulong.Parse(Console.ReadLine());

        //出力する数字
        string ans = "";

        //Nが偶数の時
        if (N % 2 == 0) {
            for (ulong i = 0; i < N / 2; i++) {
                ans += "1";
            }
        //Nが奇数の時
        } else if (N % 2 == 1) {
            for (ulong i = 0; i < N / 2; i++) {
                if (i == 0) {
                    ans += "7";
                }
                ans += "1";
            }
        }

        //出力
        Console.WriteLine(ans);
    }
}
0