結果
問題 | No.380 悪の台本 |
ユーザー | mai |
提出日時 | 2016-06-18 06:38:11 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 181 ms / 1,000 ms |
コード長 | 1,182 bytes |
コンパイル時間 | 48 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 19,712 KB |
最終ジャッジ日時 | 2024-04-24 14:32:41 |
合計ジャッジ時間 | 1,584 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 76 ms
12,032 KB |
testcase_01 | AC | 75 ms
12,160 KB |
testcase_02 | AC | 74 ms
12,160 KB |
testcase_03 | AC | 77 ms
12,032 KB |
testcase_04 | AC | 84 ms
12,544 KB |
testcase_05 | AC | 102 ms
12,416 KB |
testcase_06 | AC | 96 ms
12,288 KB |
testcase_07 | AC | 181 ms
12,160 KB |
testcase_08 | AC | 82 ms
19,712 KB |
testcase_09 | AC | 88 ms
12,544 KB |
コンパイルメッセージ
Main.rb:9: warning: assigned but unused variable - f Syntax OK
ソースコード
while cin=gets cin=cin.scan(/^(digi|petit|rabi|gema|piyo) (.+)/) if cin.size!=1 puts "WRONG!" next end cin=cin[0] f=false case (cin[0]) when "digi" then if !cin[1].downcase.match(/nyo[^a-zA-Z0-9]{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "petit" then if !cin[1].downcase.match(/nyu[^a-zA-Z0-9]{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "rabi" then if !cin[1].downcase.match(/[a-zA-Z0-9]/) puts "WRONG!" else puts "CORRECT (maybe)" end when "gema" then if !cin[1].downcase.match(/gema[^a-zA-Z0-9]{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end when "piyo" then if !cin[1].downcase.match(/pyo[^a-zA-Z0-9]{0,3}$/) puts "WRONG!" else puts "CORRECT (maybe)" end else puts "WRONG!" end end