結果

問題 No.83 最大マッチング
ユーザー けむけむけむけむ
提出日時 2021-06-15 14:53:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 374 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 8,316 KB
最終ジャッジ日時 2023-08-27 05:51:53
合計ジャッジ時間 1,155 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,884 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 16 ms
7,872 KB
testcase_03 AC 15 ms
7,864 KB
testcase_04 AC 15 ms
7,876 KB
testcase_05 AC 15 ms
7,876 KB
testcase_06 AC 16 ms
7,896 KB
testcase_07 AC 16 ms
7,792 KB
testcase_08 AC 16 ms
7,828 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def match(N):
    if N == 2:
        return 1
    elif N == 3:
        return 7
    elif N >= 4:
        p = N // 2
        q = N % 2
        if q == 0:
            result = '1' * p
            return int(result)
        elif q == 1:
            result = '7' + '1' * (p - 1)
            return int(result)

if __name__ == '__main__':
    N = int(input())
    print(match(N))
0