QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 100

#2311. 巴福西亚纳税申报

Statistics

现在是 Barfoosia 合众国的退税季节!由于他们的税务局员工很懒,U.S.B 的税收制度非常简单:发放工资时,无论你的税前收入或其他个人因素如何,都会预扣 50% 的税款。在退税过程中,会计算最终的税额,并退还或补缴差额。最终税额将根据个人的税前年收入按阶梯税率计算:

  • $0-$10,000 的收入部分免税
  • $10,000-$20,000 的收入部分征税 10%
  • $20,000-$40,000 的收入部分征税 20%
  • $40,000-$80,000 的收入部分征税 40%
  • 超过 $80,000 的收入部分征税 80%

例如,如果 Alice 去年收入为 $5,000,她所有的收入都属于免税范围,她本应缴纳 $0 的税。由于她的工资中预扣了 $2,500,她应该获得 $2,500 的退税。如果 Bob 去年收入为 $35,000,他前 $10,000 的收入免税,接下来的 $10,000 收入征税 10%,剩余的 $15,000 收入征税 20%。他本应缴纳的税额为:

$$10,000 * 0\% + ($20,000 - $10,000) * 10\% + ($35,000 - $20,000) * 20\% = $4,000$$

由于他的工资中预扣了 $17,500,他应该获得 $13,500 的退税。

给定 U.S.B 居民的税前年收入(始终为 100 的倍数),计算每个人应退还或补缴的金额。

输入格式

输入的第一行包含一个正整数 $N$ ($1 \le N \le 100$),表示 U.S.B 的居民人数。

在接下来的 $N$ 行中,第 $i$ 行包含一个整数 $X_i$ ($0 \le X_i \le 1,000,000$,$X_i$ 保证是 100 的倍数),表示第 $i$ 位居民的税前年收入。

输出格式

对于每位居民,打印一行包含应退还或补缴的税款。如果该居民应获得退税,打印 "Refund " 后跟退还金额;如果该居民需要补缴税款,打印 "Owe " 后跟补缴金额;如果两者相等,打印 "Clear"。所有打印的金额均应为整数。

样例

输入 1

4
5000
35000
0
150000

输出 1

Refund 2500
Refund 13500
Clear
Owe 2000

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.