006

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <cstdio>
using namespace std;
const int n=10;
int s;

int co(int i1){
    int j1,s1;
    s1=n;
    for (int j1 =n-1; j1 >=n-i1+1; --j1)
        s1=(s1*j1)/(n-j1+1);
    return s1;
    }

int main(){
    s=n+1;
    for (int i = 2; i <=n; ++i)s=s+co(i);
    printf("s=%d",s);    
}
Scroll to Top