题解 1171: 蟠桃记

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

筛选

【蟠桃记】 (C语言代码)

摘要:解题思路:本来是用1解答的,参考别人的解题思路后觉得2更喜欢所以一起发了。注意事项:参考代码:1:#include<stdio.h>int main(){ int n,i,t=1; while(sca……

【蟠桃记】 (C语言代码)

摘要:解题思路:注意事项:参考代码:# include<stdio.h>int main(){int i,n,sum=1;printf("请输入一个正整数n(1<n<30)\n");scanf("%d",&……

【蟠桃记】 简单易懂

摘要:解题思路:注意事项:找出关系:前一天的数目=(后一天数目+1)*2;采用循环,注意循环次数参考代码#include<stdio.h>int main(){   int N,s,t;   while(s……

【蟠桃记】 (C++代码)

摘要:解题思路:构造函数注意事项:参考代码:#include<iostream>using namespace std;int lsum(int n){ if (n == 1) { return 1; }……

可AC。。。。。。。。

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

【蟠桃记】 (Java代码)

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {……

蟠桃记-题解(C语言代码)

摘要:解题思路:注意事项:参考代码://递归解决#include<stdio.h>int find_peach(int n);int main(){ int n,m; //第n天桃子只剩一个 while(……

【蟠桃记】 (C语言代码)

摘要:解题思路:逆推回去从最后一天开始  (sum+1)*2注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,sum=1,n; whi……