結果

問題 No.83 最大マッチング
ユーザー watayuwatayu
提出日時 2023-07-19 09:35:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 11,748 KB
実行使用メモリ 15,900 KB
最終ジャッジ日時 2023-10-19 12:11:39
合計ジャッジ時間 7,047 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,068 KB
testcase_01 AC 28 ms
10,032 KB
testcase_02 AC 29 ms
10,032 KB
testcase_03 AC 30 ms
10,032 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
match = {1: 0, 2: 1, 5: 5, 4: 4, 3: 7, 7: 8, 6: 9}
res = 0
i = 1
while N > 0:
    res *= i
    if N >= 5:
        res += 7
        N -= 3
    elif N >= 4:
        res += 1
        N -= 2
    else:
        res += match[N]
        N -= N
    i *= 10
print(res)
0