結果

問題 No.293 4>7の世界
ユーザー maimai
提出日時 2016-02-08 10:35:13
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 317 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 11,828 KB
実行使用メモリ 16,048 KB
最終ジャッジ日時 2023-10-21 20:10:17
合計ジャッジ時間 3,663 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
16,048 KB
testcase_01 AC 84 ms
16,048 KB
testcase_02 AC 84 ms
16,048 KB
testcase_03 WA -
testcase_04 AC 85 ms
16,048 KB
testcase_05 AC 86 ms
16,048 KB
testcase_06 AC 85 ms
16,048 KB
testcase_07 AC 84 ms
16,048 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 84 ms
16,048 KB
testcase_11 WA -
testcase_12 AC 83 ms
16,048 KB
testcase_13 AC 83 ms
16,048 KB
testcase_14 AC 84 ms
16,048 KB
testcase_15 WA -
testcase_16 AC 83 ms
16,048 KB
testcase_17 AC 84 ms
16,048 KB
testcase_18 AC 85 ms
16,048 KB
testcase_19 AC 85 ms
16,048 KB
testcase_20 AC 86 ms
16,048 KB
testcase_21 AC 84 ms
16,048 KB
testcase_22 AC 84 ms
16,048 KB
testcase_23 AC 84 ms
16,048 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b=gets.split(" ")
if a.size!=b.size
    puts [a,b][a.size>b.size ? 0 : 1]
else
    (a.size).times{|i|
        if a[i]=="4"&&b[i]=="7"
            puts a;exit
        elsif a[i]=="7"&&b[i]=="4"
            puts b;exit
        elsif a[i]!=b[i]
            puts [a,b][a[i].to_i>b[i].to_i ? 0 : 1]
        end
    }
end
0