shadowpower / howmanysoda Goto Github PK
View Code? Open in Web Editor NEW一瓶汽水2元,2个空瓶子可以换一瓶汽水,5个瓶盖可以换一瓶汽水,你有10元,能喝几瓶?
一瓶汽水2元,2个空瓶子可以换一瓶汽水,5个瓶盖可以换一瓶汽水,你有10元,能喝几瓶?
输入您的金钱数:1
汽水多少钱一瓶:1
多少个瓶子能换一瓶汽水:3
多少个瓶盖能换一瓶汽水:3
最优策略:买一瓶,问基友借两个瓶子+两个盖子
这样有三个瓶盖可以换一瓶,三个盖子可以换一瓶,然后喝完两瓶之后把两个瓶子+两个盖子还给基友
但是程序只输出1瓶
没有基友怎么办(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.