結果

問題 No.293 4>7の世界
ユーザー megumishmegumish
提出日時 2015-10-23 23:07:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 398 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-09-30 18:01:42
合計ジャッジ時間 1,762 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 17 ms
7,860 KB
testcase_04 AC 16 ms
7,856 KB
testcase_05 AC 16 ms
7,880 KB
testcase_06 WA -
testcase_07 AC 17 ms
7,880 KB
testcase_08 AC 16 ms
7,808 KB
testcase_09 AC 16 ms
7,816 KB
testcase_10 WA -
testcase_11 AC 16 ms
7,960 KB
testcase_12 AC 16 ms
7,884 KB
testcase_13 AC 17 ms
7,856 KB
testcase_14 AC 16 ms
7,816 KB
testcase_15 AC 16 ms
7,792 KB
testcase_16 WA -
testcase_17 AC 16 ms
7,888 KB
testcase_18 AC 15 ms
7,952 KB
testcase_19 AC 16 ms
7,864 KB
testcase_20 AC 16 ms
7,992 KB
testcase_21 WA -
testcase_22 AC 16 ms
7,812 KB
testcase_23 AC 16 ms
7,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(str,input().split())
if len(A) > len(B): print(A)
elif len(A) < len(B): print(B)
i = 0
while i < len(A):
    if A[i] == '4':
        if B[i] == '7':
            print(A)
            break
    if A[i] == '7':
        if B[i] == '4':
            print(B)
            break
    if A[i] > B[i]:
        print(A)
        break
    elif A[i] < B[i]: 
        print(B)
        break
    i = i+1
0