Submission #598769
Source Code Expand
l, h = gets.chomp.split(" ").map {|n| n.to_i }
n = gets.chomp.to_i
a = []
n.times do |i|
a[i] = gets.chomp.to_i
end
a.each do |a_i|
if a_i > h
puts -1
elsif a_i < l
puts l - a_i
else
puts 0
end
end
Submission Info
| Submission Time | |
|---|---|
| Task | B - 運動管理 |
| User | tana_ash |
| Language | Ruby (2.1.5p273) |
| Score | 100 |
| Code Size | 237 Byte |
| Status | AC |
| Exec Time | 58 ms |
| Memory | 4888 KiB |
Compile Error
./Main.rb:10: warning: ambiguous first argument; put parentheses or even spaces
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt, sample-02.txt |
| All | test-01.txt, test-02.txt, test-03.txt, test-04.txt, test-05.txt, test-06.txt, test-07.txt, test-08.txt, test-09.txt, test-10.txt, test-11.txt, test-12.txt, test-13.txt, test-14.txt, test-15.txt, test-16.txt, test-17.txt, test-18.txt, test-19.txt, test-20.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| sample-01.txt | AC | 57 ms | 4840 KiB |
| sample-02.txt | AC | 58 ms | 4840 KiB |
| test-01.txt | AC | 54 ms | 4840 KiB |
| test-02.txt | AC | 56 ms | 4840 KiB |
| test-03.txt | AC | 54 ms | 4888 KiB |
| test-04.txt | AC | 57 ms | 4844 KiB |
| test-05.txt | AC | 57 ms | 4848 KiB |
| test-06.txt | AC | 57 ms | 4820 KiB |
| test-07.txt | AC | 55 ms | 4848 KiB |
| test-08.txt | AC | 55 ms | 4840 KiB |
| test-09.txt | AC | 53 ms | 4844 KiB |
| test-10.txt | AC | 53 ms | 4844 KiB |
| test-11.txt | AC | 53 ms | 4844 KiB |
| test-12.txt | AC | 52 ms | 4844 KiB |
| test-13.txt | AC | 53 ms | 4844 KiB |
| test-14.txt | AC | 53 ms | 4848 KiB |
| test-15.txt | AC | 52 ms | 4848 KiB |
| test-16.txt | AC | 52 ms | 4844 KiB |
| test-17.txt | AC | 52 ms | 4840 KiB |
| test-18.txt | AC | 54 ms | 4844 KiB |
| test-19.txt | AC | 53 ms | 4820 KiB |
| test-20.txt | AC | 53 ms | 4844 KiB |