結果
| 問題 | No.293 4>7の世界 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-02-14 12:01:16 | 
| 言語 | Python2 (2.7.18) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 14 ms / 2,000 ms | 
| コード長 | 413 bytes | 
| コンパイル時間 | 545 ms | 
| コンパイル使用メモリ | 7,040 KB | 
| 実行使用メモリ | 6,272 KB | 
| 最終ジャッジ日時 | 2024-12-30 11:53:46 | 
| 合計ジャッジ時間 | 1,964 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 20 | 
ソースコード
#coding: utf-8
##yuki_293
s=raw_input().split()
la=list(s[0])
lb=list(s[1])
a=int("".join(la))
b=int("".join(lb))
if len(la)>len(lb):
 res="".join(la)
elif len(la)<len(lb):
 res="".join(lb)
else: #len(la)==len(lb)
 for i in xrange(len(la)):
  if (la[i]=='7' and lb[i]=='4') or (la[i]=='4' and lb[i]=='7'):
   la[i],lb[i]=lb[i],la[i]
at=int("".join(la))
bt=int("".join(lb))
if at>=bt:
 print a
else:
 print b
            
            
            
        