RPS #006 - Not so expert series problem

Algebra Level 3

Let T n T_{n} denotes the n t h n^{th} term in triangle number series ( 1 , 3 , 6 , 10 , . . . ) (1,3,6,10,...) for every positive integers n n

Consider two function of S n = T 1 + T 2 + T 3 + . . . + T n S_{n} = T_1 + T_2 + T_3 + ... + T_n and R n = S 1 + S 2 + S 3 + . . . + S n R_n = S_1 + S_2 + S_3 + ... + S_n

Find the value of R 21 R_{21}

(You can see more of my problem series in my profile)


The answer is 10626.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

A Steven Kusuman
Jan 26, 2015

include<stdio.h>

define tit int

using namespace std;

int main(){

long long tit rimba[100],norman[75],step[30]={0},xx=0;

for (int i=1;i<100;i++){

xx=xx+i;

rimba[i]=xx;

}

xx=0;

for (int i=1;i<75;i++){

    xx=xx+rimba[i];

norman[i]=xx;

}

xx=0;

for (int i=1;i<30;i++){

xx=xx+norman[i];

step[i]=xx;

} printf("%lld",step[21]); }

var

a,result, b: integer;

d : integer;

begin

a := 1;

b := 21;

for d := 1 to 21 do begin

    result := result + (b*a) ;

    b := b-1;

    a := a+d+1;

end;

writeln(result) ;

end.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...