結果

問題 No.293 4>7の世界
ユーザー Tsuneo YoshiokaTsuneo Yoshioka
提出日時 2015-10-23 22:38:14
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 11,260 KB
実行使用メモリ 15,260 KB
最終ジャッジ日時 2023-08-28 21:49:00
合計ジャッジ時間 3,438 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,128 KB
testcase_01 AC 82 ms
15,252 KB
testcase_02 AC 82 ms
15,144 KB
testcase_03 AC 83 ms
15,260 KB
testcase_04 AC 81 ms
15,156 KB
testcase_05 AC 82 ms
15,132 KB
testcase_06 AC 81 ms
15,148 KB
testcase_07 AC 83 ms
15,076 KB
testcase_08 AC 82 ms
15,216 KB
testcase_09 AC 84 ms
15,232 KB
testcase_10 AC 82 ms
15,092 KB
testcase_11 AC 83 ms
15,108 KB
testcase_12 AC 80 ms
15,144 KB
testcase_13 AC 82 ms
15,256 KB
testcase_14 AC 83 ms
15,068 KB
testcase_15 AC 81 ms
15,148 KB
testcase_16 AC 83 ms
15,128 KB
testcase_17 AC 82 ms
15,196 KB
testcase_18 AC 82 ms
15,160 KB
testcase_19 AC 84 ms
15,256 KB
testcase_20 AC 81 ms
15,024 KB
testcase_21 AC 81 ms
15,148 KB
testcase_22 AC 82 ms
15,112 KB
testcase_23 AC 82 ms
15,224 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

A,B=gets.split
As=A.size;Bs=B.size
if(As!=Bs) then puts [A.to_i, B.to_i].max; exit; end
(0...As).each{|i|
    if A[i]!=B[i]
        # puts "A[i]=#{A[i]} B[i]=#{B[i]}"
        if (A[i] > B[i] || (A[i]=='4' && B[i]=='7')) && !(A[i]=='7' && B[i]=='4')
            puts A; exit
        else
            puts B; exit
        end
    end
}
0