Submission #10074656
Source Code Expand
a, b, n = gets.split.map(&:to_i) x = gets.chomp x.chars.each do |s| if s == 'S' a -= 1 elsif s == 'C' b -= 1 else if a == b a -= 1 elsif a > b && a > 0 a -= 1 else b -= 1 end end end puts a >= 0 ? a : 0 puts b >= 0 ? b : 0
Submission Info
Submission Time | |
---|---|
Task | B - 洋菓子店 |
User | ryoma123 |
Language | Ruby (2.3.3) |
Score | 200 |
Code Size | 294 Byte |
Status | AC |
Exec Time | 41 ms |
Memory | 9340 KB |
Compile Error
./Main.rb:1: warning: assigned but unused variable - n
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 35 ms | 8828 KB |
02.txt | AC | 26 ms | 5628 KB |
03.txt | AC | 29 ms | 6012 KB |
04.txt | AC | 30 ms | 6012 KB |
05.txt | AC | 16 ms | 3708 KB |
06.txt | AC | 41 ms | 9340 KB |
07.txt | AC | 11 ms | 2300 KB |
08.txt | AC | 7 ms | 1788 KB |
sample-01.txt | AC | 7 ms | 1788 KB |
sample-02.txt | AC | 7 ms | 1788 KB |
sample-03.txt | AC | 7 ms | 1788 KB |
sample-04.txt | AC | 7 ms | 1788 KB |