結果
| 問題 |
No.293 4>7の世界
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-05 13:46:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 347 bytes |
| コンパイル時間 | 219 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-18 13:32:15 |
| 合計ジャッジ時間 | 1,886 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
a, b = input().split()
if len(a) != len(b):
print([a, b][int(a) < int(b)])
else:
c = list(a)
d = list(b)
for i in range(len(a)):
if c[i] == '4' and d[i] == '7':
c[i] = '9'
elif c[i] == '7' and d[i] == '4':
d[i] = '9'
c = ''.join(c)
d = ''.join(d)
print([a, b][int(c) < int(d)])