Giter Club home page Giter Club logo

bonus-drink's Introduction

BonusDrink

問題

ある駄菓子屋で飲み物を買うと、空き瓶3本で新しい飲み物を1本プレゼントしてくれる。

最初に購入した飲み物の本数から、トータルで飲める本数を算出するプログラムを作成せよ。

また、最初に100本購入した場合、トータルで何本飲めるか。

備考

この問題は小学校3年生の算数の問題をベースとしている。

購入した本数 飲める本数
0 0
1 1
3 4
11 16
100 (プログラムで算出する)

解答方法について

  • このリポジトリを自分のアカウントにフォークして解答すること。
  • RSpecでテストを書くこと。
    • 最低限、上で示した例のテストケースはすべて必須。
    • 最初にひな形となるテストを書いているので、これにテストケースを追加していくことが望ましい。

テストの実行方法

bundle install
bundle exec rspec

bonus-drink's People

Contributors

junichiito avatar

Watchers

James Cloos avatar TomoakiKoshi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.