結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-08 02:54:48 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 5,000 ms |
| コード長 | 495 bytes |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-12-14 06:45:30 |
| 合計ジャッジ時間 | 2,151 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
コンパイルメッセージ
Syntax OK
ソースコード
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("").sort == str2.split("").sort)? "YES" : "NO"
end
def result
puts judgment(@a, @b)
end
def run
cause
result
end
end
if $0 == __FILE__
SortFreely.new.run
end