結果
問題 | No.1367 文字列門松 |
ユーザー |
|
提出日時 | 2021-01-29 22:00:13 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 90 ms / 2,000 ms |
コード長 | 142 bytes |
コンパイル時間 | 74 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-06-27 08:12:47 |
合計ジャッジ時間 | 3,204 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - i Syntax OK
ソースコード
s = gets.to_s.chomp i = 0 "kadomatsu".each_char.with_index do |c, i| s.insert(i, c) if s[i] != c end puts s == "kadomatsu" ? "Yes" : "No"