結果

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

テストケース

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

ソースコード

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(A)
0