結果

問題 No.544 Delete 7
ユーザー yumechi
提出日時 2017-08-12 15:29:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 328 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,064 KB
実行使用メモリ 52,488 KB
最終ジャッジ日時 2024-11-21 16:26:53
合計ジャッジ時間 4,268 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    lis = list(input())
    ans = ["0"]*len(lis)
    ans2 = ["0"]*len(lis)
    for idx, elem in enumerate(lis):
        if elem == "7":
            ans[idx] = "6"
            ans2[idx] = "1"
        else:
            ans[idx] = elem
    print("".join(ans), int("".join(ans2)))


if __name__=="__main__":
    solve()
0