結果

問題 No.908 うしたぷにきあくん文字列
ユーザー hoktohokto
提出日時 2020-02-21 20:15:20
言語 Ruby
(3.3.0)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 936 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-17 06:52:38
合計ジャッジ時間 2,543 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def get_i() #空白区切の入力を数値(整数)の配列で返す
  return gets.chomp.split(" ").map(&:to_i)
end
def get_f() #空白区切の入力を数値(実数)の配列で返す
  return gets.chomp.split(" ").map(&:to_f)
end
def get() #空白区切の入力を文字列の配列で返す
  return gets.chomp.split(" ")
end
def get_nsp() #入力されたものを一文字ずつに区切った文字列の配列で返す
  return gets.chomp.split("")
end
def yn_judge(bool,y="Yes",n="No") #boolに真偽を投げることで、trueならy、falseならnの値を出力する
  return bool ? y : n 
end
def array(size,n=1,init=nil) #nに配列の次元数、sizeに配列の大きさ、initに初期値を投げることでその配列を返す
  if n==1
    return Array.new(size){init}
  else
    return Array.new(n).map{Array.new(size){init}}
  end
end

s=get_nsp
s.push(" ")
s=s.join("")
puts yn_judge(s.match(/^([a-z] )+$/))
0