結果

問題 No.69 文字を自由に並び替え
ユーザー korogykorogy
提出日時 2017-09-08 02:37:49
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 493 bytes
コンパイル時間 34 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-06-27 13:49:58
合計ジャッジ時間 2,011 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class SortFreely
    attr_reader :a, :b

    def initialize(a: "", b: "")
        @a, @b = a, b
    end

    def cause
        begin
            @a = gets.chomp
            @b = gets.chomp
        rescue
            
        end
    end

    def judgment(str1, str2)
        ((str1.split("") - str2.split("")).empty?)? "YES" : "NO"
    end

    def result
        puts judgment(@a, @b)
    end

    def run
        cause
        result
    end
end

if $0 == __FILE__
    SortFreely.new.run
end
0