結果

問題 No.293 4>7の世界
ユーザー roiti46roiti46
提出日時 2015-10-23 22:38:11
言語 Python2
(2.7.18)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 631 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 6,640 KB
実行使用メモリ 7,932 KB
最終ジャッジ日時 2023-08-28 21:49:05
合計ジャッジ時間 2,410 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
7,876 KB
testcase_01 AC 24 ms
7,912 KB
testcase_02 AC 24 ms
7,908 KB
testcase_03 AC 23 ms
7,812 KB
testcase_04 AC 24 ms
7,756 KB
testcase_05 AC 24 ms
7,932 KB
testcase_06 AC 23 ms
7,752 KB
testcase_07 AC 24 ms
7,760 KB
testcase_08 AC 24 ms
7,756 KB
testcase_09 AC 24 ms
7,724 KB
testcase_10 AC 23 ms
7,784 KB
testcase_11 AC 24 ms
7,916 KB
testcase_12 AC 23 ms
7,756 KB
testcase_13 AC 24 ms
7,912 KB
testcase_14 AC 23 ms
7,788 KB
testcase_15 AC 24 ms
7,776 KB
testcase_16 AC 24 ms
7,760 KB
testcase_17 AC 23 ms
7,836 KB
testcase_18 AC 23 ms
7,776 KB
testcase_19 AC 24 ms
7,724 KB
testcase_20 AC 24 ms
7,792 KB
testcase_21 AC 24 ms
7,768 KB
testcase_22 AC 23 ms
7,836 KB
testcase_23 AC 23 ms
7,764 KB
権限があれば一括ダウンロードができます

ソースコード

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