题解 1072: 汽水瓶

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

按照题目思路解题

摘要:解题思路:注意事项:参考代码:void Calculate(int in) {    int drink = 0;    //记录累计喝下的汽水个数    int replace = 0;    //……

递归思想解题

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int s=0;int F(int n){    if(n<2){        return……

汽水瓶:n/2

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int i=-1,j,n[100];    do{        scanf("%d",&n[++i]);……

用小学生思路解决此题

摘要:解题思路:枚举注意事项:参考代码:#include<stdio.h>int main(){ int a[10];int i=0,m=1;while(m){    scanf("%d",&a[i]); ……

while循环的简单使用

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int x(int n) {    int sum = 0;    if (n < 2) return 0;     while (n……