結果

問題 No.83 最大マッチング
ユーザー bayashiko_rbayashiko_r
提出日時 2018-11-08 01:16:52
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 634 bytes
コンパイル時間 1,244 ms
コンパイル使用メモリ 103,168 KB
実行使用メモリ 40,704 KB
最終ジャッジ日時 2024-04-30 22:36:10
合計ジャッジ時間 7,356 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
17,408 KB
testcase_01 WA -
testcase_02 AC 24 ms
17,408 KB
testcase_03 WA -
testcase_04 AC 22 ms
17,536 KB
testcase_05 WA -
testcase_06 AC 24 ms
17,664 KB
testcase_07 WA -
testcase_08 AC 22 ms
17,792 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2,174 ms
40,576 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) {
        //入力
        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