結果

問題 No.293 4>7の世界
ユーザー etale.K3etale.K3
提出日時 2021-07-07 11:50:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-09-14 04:36:15
合計ジャッジ時間 1,332 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,944 KB
testcase_01 AC 15 ms
7,900 KB
testcase_02 AC 14 ms
7,900 KB
testcase_03 WA -
testcase_04 AC 14 ms
7,896 KB
testcase_05 AC 13 ms
7,760 KB
testcase_06 AC 13 ms
7,812 KB
testcase_07 AC 13 ms
7,732 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 13 ms
7,936 KB
testcase_11 WA -
testcase_12 AC 13 ms
7,808 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 14 ms
7,936 KB
testcase_16 AC 13 ms
7,736 KB
testcase_17 AC 13 ms
7,760 KB
testcase_18 AC 15 ms
7,852 KB
testcase_19 AC 13 ms
7,908 KB
testcase_20 AC 12 ms
7,824 KB
testcase_21 AC 12 ms
7,824 KB
testcase_22 AC 12 ms
7,764 KB
testcase_23 AC 12 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = input().split()

ans = A
Al, Bl = len(A), len(B)

if Al < Bl:
    ans = B

if Al == Bl:
    for i in range(Al):
        if A[i] == '7' and B[i] == '4':
            ans = B
            break
        elif (A[i] != '4' or B[i] != '7') and A[i] < B[i]:
            ans = B
            break

print(ans)
0