Giter Club home page Giter Club logo

movie_pricing_challenge's Introduction

映画料金計算チャレンジ

overview

映画料金を計算を計算するプログラムを書いてみる。

仕様

  • INPUTは以下の形式で与えられる。
    • screenTypeには、以下が設定される。

      意味 料金
      "1" 通常スクリーン +¥0
      "2" IMAX +¥500
      "3" 4DX +¥1200
    • watchDatetimeには、上映時間が設定され、特別料金として基本料金が以下の料金となる。

      • だたし、特別料金が基本料金よりも高額な場合は、基本料金が適用される。
      • 日本時間で入力されるものとし、フォーマットは「YYYY-MM-DD HH-MI」形式とする。
      条件 特別料金
      毎月1日 ¥1000
      毎週水曜日 ¥1200
      毎日20時以降 ¥1400
    • ticketsは、チケットの種類ごとにデータが設定される。

      • typeは以下の通り、チケットの種類が設定され、種類ごとに基本料金が異なる。

        意味 料金
        "1" 一般 ¥1800
        "2" 大学生 ¥1500
        "3" 高校生 ¥1300
        "4" 中/小学生 ¥1100
        "5" 幼児 ¥1000
      • amountには、数量が設定される

      • menbershipには、シネマ会員有無が設定され、会員である場合は料金から一律¥300引きされる

{
  "screenType": "1",
  "watchDatetime": "2022-06-12 12:00", 
  "tickets": [
    {
      "type": "1",
      "amount": 1,
      "membership": true
    }
  ]
}
  • 不正な値(規定値外、型エラー等)は、入力されないものとする。
  • 00:00-09:00の間は、映画が上映されないものとする。
  • 同時に注文できるチケット数は、合計30枚までとする。
  • OUTPUTは、チケット料金の合計とする。

movie_pricing_challenge's People

Contributors

wadabee avatar

Watchers

 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.