結果

問題 No.293 4>7の世界
ユーザー flippergo
提出日時 2024-12-19 10:46:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 434 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 53,876 KB
最終ジャッジ日時 2024-12-19 10:46:42
合計ジャッジ時間 2,889 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = input().split()
ka = len(A)
kb = len(B)
if ka>kb:
    print(A)
elif kb>ka:
    print(B)
else:
    for i in range(ka):
        a = int(A[i])
        b = int(B[i])
        if a==b:continue
        if a==4 and b==7:
            print(A)
            break
        elif a==7 and b==4:
            print(B)
            break
        elif a>b:
            print(A)
            break
        else:
            print(B)
            break
0