Решение на Първа задача от Пламен Каращранов
Обратно към всички решения
Към профила на Пламен Каращранов
Резултати
- 4 точки от тестове
- 0 бонус точки
- 4 точки общо
- 8 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
........FFFF
Failures:
1) series handles summed series for base cases
Failure/Error: series('summed', 1).should eq 3
expected: 3
got: nil
(compared using ==)
# /tmp/d20141023-2426-17zlcc5/spec.rb:45:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) series handles summed series for odd numbers
Failure/Error: series('summed', 7).should eq 31
expected: 31
got: nil
(compared using ==)
# /tmp/d20141023-2426-17zlcc5/spec.rb:50:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) series handles summed series for even numbers
Failure/Error: series('summed', 8).should eq 50
expected: 50
got: nil
(compared using ==)
# /tmp/d20141023-2426-17zlcc5/spec.rb:55:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) series handles summed series for bigger numbers
Failure/Error: series('summed', 15).should eq 1453
expected: 1453
got: nil
(compared using ==)
# /tmp/d20141023-2426-17zlcc5/spec.rb:60:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.01671 seconds
12 examples, 4 failures
Failed examples:
rspec /tmp/d20141023-2426-17zlcc5/spec.rb:44 # series handles summed series for base cases
rspec /tmp/d20141023-2426-17zlcc5/spec.rb:49 # series handles summed series for odd numbers
rspec /tmp/d20141023-2426-17zlcc5/spec.rb:54 # series handles summed series for even numbers
rspec /tmp/d20141023-2426-17zlcc5/spec.rb:59 # series handles summed series for bigger numbers
История (3 версии и 2 коментара)
Пламен обнови решението на 13.10.2014 17:50 (преди около 10 години)
Пламен обнови решението на 14.10.2014 09:43 (преди около 10 години)
Пламен обнови решението на 14.10.2014 17:18 (преди около 10 години)