题解 | #大吉大利,今晚吃鸡#
大吉大利,今晚吃鸡
http://www.nowcoder.com/practice/c9d9f9c60b4448eabc0569f80a3461bb
int main() {
int n;
while (scanf("%d", &n) != EOF) {
int m = 1;
for (int i = 0; i < n; i++)
m *= 3;
printf("%d\n", m - 1);
}
return 0;
}