結果
| 問題 |
No.908 うしたぷにきあくん文字列
|
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2020-04-23 17:09:52 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 208 bytes |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-10-13 16:38:17 |
| 合計ジャッジ時間 | 2,953 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
コンパイルメッセージ
Syntax OK
ソースコード
S = gets.chomp.chars
odds = []
evens = []
S.each.with_index(1) do |s, i|
if i.even?
evens << s
else
odds << s
end
end
if evens.all?(/\s/) && odds.all?(/\w/)
puts 'Yes'
else
puts 'No'
end
siman