結果
問題 |
No.380 悪の台本
|
ユーザー |
|
提出日時 | 2016-06-17 23:01:20 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,033 bytes |
コンパイル時間 | 58 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-11-06 22:39:42 |
合計ジャッジ時間 | 1,847 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 5 |
コンパイルメッセージ
Main.rb:4: warning: assigned but unused variable - f Syntax OK
ソースコード
while cin=gets cin=cin.chomp.split f=false case (cin[0]) when "digi" then if !cin[-1].downcase.match(/nyo\W{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "petit" then if !cin[-1].downcase.match(/nyu\W{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "rabi" then if !cin[-1].downcase.match(/\w$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "gema" then if !cin[-1].downcase.match(/gema\W{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "piyo" then if !cin[-1].downcase.match(/pyo\W{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end else puts "WRONG!" end end