結果

問題 No.293 4>7の世界
コンテスト
ユーザー GrayCoder
提出日時 2018-11-03 14:41:16
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 394 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 583 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2026-05-14 22:21:18
合計ジャッジ時間 3,839 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 13 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from sys import stdin

def main():
    A, B = input().split()

    if len(A) == len(B):
        a, b = '', ''
        for s in zip(A, B):
            if '4' in s and '7' in s:
                s = [s[1], s[0]]
            a += s[0]
            b += s[1]
        a, b = int(a), int(b)
    else:
        a, b = int(A), int(B)
    print(max(a, b))

input = lambda: stdin.readline().rstrip()
main()
0