結果
問題 | No.293 4>7の世界 |
ユーザー |
|
提出日時 | 2022-11-15 16:38:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 1,296 bytes |
コンパイル時間 | 364 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-16 16:01:37 |
合計ジャッジ時間 | 1,904 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
def main():A, B = input().split()if len(A) > len(B):print(A)returnif len(B) > len(A):print(B)returnfor a_elm, b_elm in zip(A, B):match a_elm:case "4":match b_elm:case "7":print(A)returncase "4":continuecase num:if 4 > int(num):print(A)else:print(B)returncase "7":match b_elm:case "4":print(B)returncase "7":continuecase num:if 7 > int(num):print(A)else:print(B)returncase num:if int(num) < int(b_elm):print(B)returnif int(num) > int(b_elm):print(A)returnif __name__ == "__main__":main()