結果

問題 No.293 4>7の世界
コンテスト
ユーザー gorugo30
提出日時 2021-03-18 10:06:06
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 24 ms / 2,000 ms
+ 240µs
コード長 480 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 71 ms
コンパイル使用メモリ 80,640 KB
実行使用メモリ 54,528 KB
最終ジャッジ日時 2026-09-24 10:21:44
合計ジャッジ時間 2,794 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A, B = input().split()
if len(A) != len(B):
    if len(A) > len(B):
        print(A)
    else:
        print(B)
    exit()

compare = ["47", "74"]
for i in range(len(A)):
    if A[i] + B[i] in compare:
        if A[i] == "4":
            print(A)
            exit()
        else:
            print(B)
            exit()
    else:
        if A[i] == B[i]:
            continue
        if int(A[i]) > int(B[i]):
            print(A)
        else:
            print(B)
        exit()
0