結果

問題 No.83 最大マッチング
ユーザー kashiwagi513kashiwagi513
提出日時 2019-02-22 23:27:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 350 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 8,344 KB
最終ジャッジ日時 2023-08-17 06:19:19
合計ジャッジ時間 1,999 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

# -*- coding: utf-8 -*-

def solve(n):
    result = 0
    digit = 1
    if n % 2 == 0:
        for i in range(0, n // 2):
            result += digit
            digit *= 10
    else:
        for i in range(0, n // 2):
            result += digit if i < (n // 2) - 1 else 7 * digit
            digit *= 10
    print(result)

n = int(input())
solve(n)
0