結果

問題 No.293 4>7の世界
ユーザー roiti46
提出日時 2015-10-23 22:38:11
言語 Python2
(2.7.18)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 631 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-12-30 11:13:40
合計ジャッジ時間 2,713 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

A, B = raw_input().split()
if len(A) > len(B):
    print A
elif len(A) < len(B):
    print B
else:
    for i, j in zip(A, B):
        if i not in ["4", "7"] or j not in ["4", "7"]:
            if int(i) > int(j):
                print A
                break
            elif int(i) < int(j):
                print B
                break
        else:
            if i == "4" and j == "7":
                print A
                break
            elif i == "7" and j == "4":
                print B
                break
0