結果

問題 No.293 4>7の世界
コンテスト
ユーザー cologne
提出日時 2025-11-18 14:45:13
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 64 ms / 2,000 ms
+ 343µs
コード長 505 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 275 ms
コンパイル使用メモリ 95,852 KB
実行使用メモリ 79,104 KB
最終ジャッジ日時 2026-07-16 19:31:15
合計ジャッジ時間 3,254 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
import sys


def input(): return sys.stdin.readline().rstrip('\n')


def main():
    a, b = input().split()
    if len(a) != len(b):
        print(a if len(a) > len(b) else b)
        return
    for i, j in zip(a, b):
        if (i, j) == ('4', '7'):
            print(a)
            return
        if (i, j) == ('7', '4'):
            print(b)
            return
        if i != j:
            print(a if i > j else b)
            return
    print(a)


if __name__ == '__main__':
    main()
0