#C++ (削除) 99 (削除ここまで)(削除) 81 (削除ここまで)(削除) 78 (削除ここまで)(削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;while(i<x)a[i++]=a[--i]+(++i)+i+1;return a;}
C++ (削除) 99 (削除ここまで)(削除) 81 (削除ここまで)(削除) 78 (削除ここまで)(削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;while(i<x)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで)(削除) 81 (削除ここまで)(削除) 78 (削除ここまで)(削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;while(i<x)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
C++ (削除) 99 (削除ここまで)(削除) 81 (削除ここまで)(削除) 78 (削除ここまで)(削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;while(i<x)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで) (削除) 81 (削除ここまで) (削除) 78 (削除ここまで) (削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;fori=1;a[0]=1;while(;i<x;i<x)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで) (削除) 81 (削除ここまで) (削除) 78 (削除ここまで) (削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;for(;i<x;)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで) (削除) 81 (削除ここまで) (削除) 78 (削除ここまで) (削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;while(i<x)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで) (削除) 81 (削除ここまで) 78(削除) 78 (削除ここまで)(削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;for(;i<x;){a[i++]=a[--i]+(++i)+i+1;}return+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで) (削除) 81 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;for(;i<x;){a[i++]=a[--i]+(++i)+i+1;}return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...
#C++ (削除) 99 (削除ここまで) (削除) 81 (削除ここまで) (削除) 78 (削除ここまで)(削除) 80 (削除ここまで) 78
int* f(int x){int a[x],i=1;a[0]=1;for(;i<x;)a[i++]=a[--i]+(++i)+i+1;return a;}
my first try in code-golf
this code is based on
a = 2 x n - 1
where n is term count and a is n th term in the following series
1, 3, 5, 9, 11, 13, .....
sum of first 2 terms = 2 squared
sum of first 3 terms = 3 squared
and so on...