結果

問題 No.293 4>7の世界
ユーザー mathshabmathshab
提出日時 2017-07-03 16:55:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 676 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-15 14:38:03
合計ジャッジ時間 1,653 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 31 ms
10,752 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 RE -
testcase_07 AC 30 ms
10,880 KB
testcase_08 AC 30 ms
10,752 KB
testcase_09 AC 30 ms
10,752 KB
testcase_10 RE -
testcase_11 AC 30 ms
10,752 KB
testcase_12 AC 30 ms
10,752 KB
testcase_13 AC 35 ms
10,752 KB
testcase_14 AC 31 ms
10,880 KB
testcase_15 AC 30 ms
10,880 KB
testcase_16 RE -
testcase_17 AC 30 ms
10,880 KB
testcase_18 AC 31 ms
10,752 KB
testcase_19 AC 30 ms
10,752 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 AC 30 ms
10,752 KB
testcase_23 AC 30 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=(list(i) for i in input().split())
if len(A)>len(B):
    Ou=A.join("")
elif len(B)>len(A):
    Ou=B.join("")
else:
    Ou=[]
    i=0
    while i<len(A) and Ou==[]:
#        print(A)
        A[i]=int(A[i])
        B[i]=int(B[i])
        if A[i]>B[i]:
            if A[i]!=7:
                Ou=A
            elif B[i]!=4:
                Ou=A
            else:
                Ou=B
        elif B[i]>A[i]:
            if A[i]!=4:
                Ou=B
            elif B[i]!=7:
                Ou=B
            else:
                Ou=A
        i+=1
for i in range(len(Ou)):
    Ou[i]=str(Ou[i])
#    print(Ou)
if len(Ou)==1:
    an=Ou[0]
else:
    an="".join(Ou)
print(an)
0