2017年第八届蓝桥杯 —— 训练题目 —— 空瓶换汽水
生活随笔
收集整理的這篇文章主要介紹了
2017年第八届蓝桥杯 —— 训练题目 —— 空瓶换汽水
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.空瓶換汽水
浪費可恥,節約光榮。飲料店節日搞活動:不用付費,用3個某飲料的空瓶就可以換一瓶該飲料。
剛好小明前兩天買了2瓶該飲料喝完了,瓶子還在。
他耍了個小聰明,向老板借了一個空瓶,湊成3個,換了一瓶該飲料,喝完還瓶!!
飲料店老板一統計,已經售出該飲料且未還瓶的有12345瓶,那么如果這些飲料的買主都如小明一樣聰明,老板最多還需要送出多少瓶飲料呢?
顯然答案是個正整數。
code
/*^....0^ .1 ^1^.. 011.^ 1.0^ 1 ^ ^0.11 ^ ^..^0. ^ 0^.0 1 .^.1 ^0 .........001^.1 1. .111100....01^00 ^ 11^ ^1. .1^1.^ ^0 0^.^ ^0..1.1 1..^1 .0 ^ ^00. ^^0.^^ 0 ^^110.^0 0 ^ ^^^10.01^^ 10 1 1 ^^^1110.101 10 1.1 ^^^1111110010 01 ^^ ^^^1111^1.^ ^^^10 10^ 0^ 1 ^^111^^^0.1^ 1....^11 0 ^^11^^^ 0.. ....1^ ^ ^1. 0^ ^11^^^ ^ 1 111^ ^ 0.10 00 11 ^^^^^ 1 0 1.0^ ^0 ^0 ^^^^ 0 0.0^ 1.0 .^ ^^^^ 1 1 .0^.^ ^^ 0^ ^1 ^^^^ 0. ^.11 ^ 11 1. ^^^ ^ ^ ..^^..^ ^1 ^.^ ^^^ .0 ^.00..^ ^0 01 ^^^ .. 0..^1 .. .1 ^.^ ^^^ 1 ^ ^0001^ 1. 00 0. ^^^ ^.0 ^.1. 0^. ^.^ ^.^ ^^^ ..0.01 .^^. .^ 1001 ^^ ^^^ . 1^. ^ ^. 11 0. 1 ^ ^^ 0.0 ^. 0 ^0 1 ^^^ 0.0.^ 1. 0^ 0 .1 ^^^ ...1 1. 00 . .1 ^^^ ..1 1. ^. 0 .^ ^^ ..0. 1. .^ . 0 ..1 1. 01 . . ^ 0^.^ 00 ^0 1. ^ 1 1.0 00 . ^^^^^^ ..^ 00 01 ..1. 00 10 1 ^^.1 00 ^. ^^^ .1.. 00 .1 1..01 ..1.1 00 1. ..^ 10^ 1^ 00 ^.1 0 1 1.1 00 00 ^ 1 ^. 00 ^.^ 10^ ^^1.1 00 00 10^..^ 1. ^. 1.0 1 ^. 00 00 .^^ ^. ^ 1 00 ^0000^ ^ 011 0 ^. 00.0^ ^00000 1.00.1 11. 1 0 1^^0.01 ^^^ 01.^ ^ 1 1^^ ^.^1 1 0... 1 ^1 1^ ^ .01 ^ 1.. 1.1 ^0.0^ 0 1..01^^100000..0^1 1 ^ 1 ^^1111^ ^^0 ^ ^ 1 1000^.1 ^.^ . 00.. 1.1 0. 01. . 1. .^1. 1 1. ^0^ . ^.1 00 01^.0 001. .^*/ // VB_king —— 2017_Training topics_Result filling in the blanks_1.cpp created by VB_KoKing on 2019-05-05:08. /* Procedural objectives:Variables required by the program:Procedural thinking:Functions required by the program:*/ /* My dear Max said: "I like you, So the first bunch of sunshine I saw in the morning is you, The first gentle breeze that passed through my ear is you, The first star I see is also you. The world I see is all your shadow."FIGHTING FOR OUR FUTURE!!! */ #include <iostream> using namespace std; int main() {cout<<12345/2<<endl;return 0; }Answer
6172
總結
以上是生活随笔為你收集整理的2017年第八届蓝桥杯 —— 训练题目 —— 空瓶换汽水的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2016年第七届蓝桥杯C/C++ A组国
- 下一篇: 2017年第八届蓝桥杯 —— 训练题目