QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 256 MB Puntuación total: 100

#12589. 公交车

Estadísticas

一辆载有 $n$ 名乘客的公交车在公交站打开了车门。恰好一半的乘客外加半个乘客下车了。在下一站,同样地,一半的乘客外加半个乘客下车。这个过程总共持续了 $k$ 站。已知公交车在离开最后一站时是空的,且在旅途中没有人受伤,请确定公交车上最初的乘客人数 $n$。

输入格式

输入的第一行包含测试用例的数量 $T$。接下来是各测试用例的描述: 每个测试用例仅包含一行,即停靠站的数量 $k$,其中 $1 \leqslant k \leqslant 30$。

输出格式

对于每个测试用例,输出一行,包含一个整数,即公交车上最初的乘客人数。

样例

输入 1

2
1
3

输出 1

1
7

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.