結果
問題 | No.632 穴埋め門松列 |
ユーザー | mai |
提出日時 | 2017-04-22 23:00:27 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 360 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 11,368 KB |
実行使用メモリ | 15,268 KB |
最終ジャッジ日時 | 2023-09-28 21:42:49 |
合計ジャッジ時間 | 1,631 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 83 ms
15,268 KB |
testcase_02 | AC | 86 ms
15,208 KB |
testcase_03 | AC | 83 ms
15,080 KB |
testcase_04 | AC | 83 ms
15,156 KB |
testcase_05 | WA | - |
コンパイルメッセージ
Main.rb:12: warning: `*' interpreted as argument prefix Main.rb:13: warning: `*' interpreted as argument prefix Main.rb:19: warning: `elsif' at the end of line without an expression Syntax OK
ソースコード
line = gets.chomp! abort unless line abort unless line=~/^[23?] [23?] [23?]$/ c = line.split abort unless c.uniq==c def kadomatu?(a,b,c) a!=b&&b!=c&&c!=a&&((a<b&&b>c)||(a>b&&b<c)) end t1 = kadomatu? *line.gsub('?','1').split t4 = kadomatu? *line.gsub('?','4').split if t1 && t4 puts 14 elsif t1 puts 1 elsif puts 4 else puts "🎍" end