Giter Club home page Giter Club logo

luckincoffeecount's Introduction

瑞幸咖啡优惠共享计算器

计算规则详情

最近有个神奇的需求,经常在一起聚众点咖啡的咖啡组小伙伴们,突然觉得经常要手算群收款金额有点麻烦,希望有个工具可以快速计算金额。

很好,这就变成一个计算题了,我们来分析一下计算规则。

现在瑞幸咖啡的市价:22 元,25 元,28 元(共三种价位)

某宝瑞幸咖啡代充券价:10.4 元,11.4 元,12.4 元(对应上述三种价位)【这里可以发现淘宝价大概人均 4.8 折左右。】

瑞幸本身又经常会送诸如:1.8 折,3.8 折这样的优惠券

所以现在如果有五个人要点咖啡,比如 1 杯 22 的咖啡,3杯 25 的咖啡,1杯 28 的咖啡,你又刚好有一张瑞幸送的 1.8 折的优惠券,怎么让优惠最大化呢?

很明显,解决方案是:买 4 张淘宝代充券即可,让 28 那杯咖啡用个 1.8 折的券,可以获得最大优惠。

现在问题来了,用 1.8 折优惠的咖啡比原来淘宝可以多省 3 折的钱,而这个 3 折的钱还需要再平摊给每个人来共享优惠,请输出分摊优惠以后每个人应该付的钱。

技术方案

  • wxPython

实现效果

luckincoffeecount's People

Contributors

shaonianyr avatar

Stargazers

 avatar

Watchers

 avatar  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.