Task: | ABC-poisto |
Sender: | hltk |
Submission time: | 2020-10-19 11:32:05 +0300 |
Language: | Ruby |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.07 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.07 s | 2 | details |
Code
gets.to_i.times do s = gets m = s.chars.uniq.map { |c| s.count c }.max n = s.length puts m*2 <= n ? n-n%2 : (n-m)*2 end