#include <stdio.h>
//練習問題G
int main(void) {
int n = 3;
int an,bn,cn;
an=1;
bn=2;
cn=-2;
for(int i=0;i<n;i++){
cn=cn+2*bn+-2*an;
}
printf("数列anについて, n=%dのときの値は%d\n", n
, cn
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v57e057+S5ZWP6aGMRwppbnQgbWFpbih2b2lkKSB7CglpbnQgbiA9IDM7CiAgICBpbnQgYW4sYm4sY247CiAgICBhbj0xOwogICAgYm49MjsKICAgIGNuPS0yOwogICAgZm9yKGludCBpPTA7aTxuO2krKyl7CiAgICBjbj1jbisyKmJuKy0yKmFuOwogICAgfQogICAgcHJpbnRmKCLmlbDliJdhbuOBq+OBpOOBhOOBpiwgbj0lZOOBruOBqOOBjeOBruWApOOBryVkXG4iLCBuLCBjbik7CglyZXR1cm4gMDsKfQo=