题解 1180: 不容易系列

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

筛选

不容易系列(递推)

摘要:解题思路:递推注意事项:参考代码:#include<iostream>#include<cmath>usingnamespacestd;in……

编写题解 1180: 不容易系列

摘要:解题思路:注意事项:参考代码:#include<stdio.h>void sum(int t){    int i;    int x=3;    for(i=1;i<=t;i++)    {    ……

编写题解 1180: 不容易系列

摘要:解题思路:注意事项:参考代码:n=int(input()) for i in range(n):     a=int(input())     y=3     for j in range(a……

不容易系列

```c#includeinthanshu(intk);//函数声明inthanshu(intk)//函数定义{intn=0,i;//n为第K站的绵羊的数量if(k==0)return3;//k==0,表示第0站,返回3,表示只有三只羊else{for(i=1;i

不容易系列 (Java代码)

解题思路:注意事项:参考代码:publicclass不容易系列{publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubScannerin=newScanner(System.in);intN=in.nextInt();inta

不容易系列 (C语言代码)

摘要:解题思路:最后只剩下3只羊,所以每次都要拿剩下的羊减去1再乘以2注意事项:注意利用for循环和while循环参考代码:#include<stdio.h>int main(){    int n,a[1……