結果

問題 No.293 4>7の世界
ユーザー yaoshimax
提出日時 2016-05-14 19:11:31
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-12-30 12:01:08
合計ジャッジ時間 1,556 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,raw_input().split())

n,m=N,M
nflag=True
while n!=0 and m!=0:
    a,b=n%10,m%10
    if (a,b) == (4,7):
        nflag=True
    elif (a,b) == (7,4):
        nflag=False
    elif a>b:
        nflag=True
    elif b>a:
        nflag=False
    n/=10
    m/=10
if n!=0:
    print N
elif m!=0:
    print M
elif nflag:
    print N
else:
    print M

0