結果

問題 No.293 4>7の世界
ユーザー GrayCoderGrayCoder
提出日時 2018-11-03 14:41:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 10,904 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-08-13 02:34:55
合計ジャッジ時間 1,893 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 16 ms
7,876 KB
testcase_03 AC 15 ms
7,872 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,788 KB
testcase_06 AC 15 ms
7,812 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
7,868 KB
testcase_11 AC 15 ms
7,820 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 15 ms
7,788 KB
testcase_16 AC 15 ms
7,984 KB
testcase_17 AC 15 ms
7,824 KB
testcase_18 AC 16 ms
7,868 KB
testcase_19 AC 15 ms
7,740 KB
testcase_20 AC 15 ms
7,860 KB
testcase_21 AC 15 ms
7,824 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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