結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-22 23:00:27 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 360 bytes |
| コンパイル時間 | 70 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-07-21 16:30:23 |
| 合計ジャッジ時間 | 1,214 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 2 |
コンパイルメッセージ
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