結果

問題 No.83 最大マッチング
ユーザー _KingdomOfMoray
提出日時 2019-11-18 22:34:32
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 776 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 14,080 KB
最終ジャッジ日時 2024-10-02 12:03:45
合計ジャッジ時間 1,439 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 5 RE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

# n = [int(input()) for i in range(1)]
n = int(input())

lose = 0
cur = n
answer = []

while cur > 1:
    if cur == 2:
        answer.append(1)
        lose = 2
    elif cur == 3:
        answer.append(7)
        lose = 3
    elif cur == 4:
        answer.append(1)
        answer.append(1)
        lose = 4
    elif cur == 5:
        answer.append(1)
        answer.append(7)
        lose = 5
    elif cur == 6:
        answer.append(1)
        answer.append(1)
        answer.append(1)
        lose = 6
    elif cur >= 7:
        answer.append(1)
        answer.append(1)
        answer.append(7)
        lose = 7
    
    cur = cur - lose
    
sorted_answer = sorted(answer)

maped_sorted_answer = map(str, sorted_answer)
res = ''.join(maped_sorted_answer)

print(int(res))
0