CF23B.Party

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

nn people came to a party. Then those, who had no friends among people at the party, left. Then those, who had exactly 1 friend among those who stayed, left as well. Then those, who had exactly 2,3,...,n12,3,...,n-1 friends among those who stayed by the moment of their leaving, did the same.

What is the maximum amount of people that could stay at the party in the end?

输入格式

The first input line contains one number tt — amount of tests ( 1<=t<=1051<=t<=10^{5} ). Each of the following tt lines contains one integer number nn ( 1<=n<=1051<=n<=10^{5} ).

输出格式

For each test output in a separate line one number — the maximum amount of people that could stay in the end.

输入输出样例

  • 输入#1

    1
    3
    

    输出#1

    1
    
首页