結果

問題 No.293 4>7の世界
ユーザー 141sksk
提出日時 2020-01-07 16:02:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 547 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-23 01:00:43
合計ジャッジ時間 1,678 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():

    a, b = map(str, input().split())
    if len(a) < len(b):
        print(b)
    elif len(a) > len(b):
        print(a)
    else:
        for x, y in zip(a, b):
            if x == '4' and y == '7':
                print(a)
                break
            elif x == '7' and y == '4':
                print(b)
                break
            elif int(x) > int(y):
                print(a)
                break
            elif int(x) < int(y):
                print(b)
                break

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