Решение на Първа задача от Станимир Митев
Обратно към всички решения
Към профила на Станимир Митев
Резултати
- 4 точки от тестове
- 0 бонус точки
- 4 точки общо
- 8 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
....FFFF....
Failures:
1) series handles lucas series for base cases
Failure/Error: series('lucas', 1).should eq 2
ArgumentError:
wrong number of arguments (1 for 2)
# /tmp/d20141023-2426-1xxju58/solution.rb:17:in `series'
# /tmp/d20141023-2426-1xxju58/solution.rb:19:in `series'
# /tmp/d20141023-2426-1xxju58/spec.rb:25: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 lucas series for odd numbers
Failure/Error: series('lucas', 7).should eq 18
ArgumentError:
wrong number of arguments (1 for 2)
# /tmp/d20141023-2426-1xxju58/solution.rb:17:in `series'
# /tmp/d20141023-2426-1xxju58/solution.rb:19:in `series'
# /tmp/d20141023-2426-1xxju58/spec.rb:30: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 lucas series for even numbers
Failure/Error: series('lucas', 8).should eq 29
ArgumentError:
wrong number of arguments (1 for 2)
# /tmp/d20141023-2426-1xxju58/solution.rb:17:in `series'
# /tmp/d20141023-2426-1xxju58/solution.rb:19:in `series'
# /tmp/d20141023-2426-1xxju58/spec.rb:35: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 lucas series for bigger numbers
Failure/Error: series('lucas', 15).should eq 843
ArgumentError:
wrong number of arguments (1 for 2)
# /tmp/d20141023-2426-1xxju58/solution.rb:17:in `series'
# /tmp/d20141023-2426-1xxju58/solution.rb:19:in `series'
# /tmp/d20141023-2426-1xxju58/spec.rb:40: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.0226 seconds
12 examples, 4 failures
Failed examples:
rspec /tmp/d20141023-2426-1xxju58/spec.rb:24 # series handles lucas series for base cases
rspec /tmp/d20141023-2426-1xxju58/spec.rb:29 # series handles lucas series for odd numbers
rspec /tmp/d20141023-2426-1xxju58/spec.rb:34 # series handles lucas series for even numbers
rspec /tmp/d20141023-2426-1xxju58/spec.rb:39 # series handles lucas series for bigger numbers
История (2 версии и 1 коментар)
Станимир обнови решението на 13.10.2014 14:36 (преди около 10 години)
Станимир обнови решението на 15.10.2014 07:41 (преди около 10 години)