結果
問題 | No.293 4>7の世界 |
ユーザー |
![]() |
提出日時 | 2020-01-29 21:12:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 558 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-09-16 02:25:31 |
合計ジャッジ時間 | 1,752 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A,B = map(list, read().split()) A = [x - ord('0') for x in A] B = [x - ord('0') for x in B] if len(A) > len(B): answer = A elif len(A) < len(B): answer = B else: for a,b in zip(A,B): if a in [4,7] and b in [4,7]: a = 11-a b = 11-b if a == b: continue if a > b: answer = A else: answer = B break print(''.join(map(str,answer)))