CF2218A.The 67th Integer Problem

入门

通过率:0%

AC君温馨提醒

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

题目描述

Welcome to the New World, O Esteemed Earthly Visitor. You've been summoned by Macaque, a primate with four legs, a god complex and a terminal addiction to the word "trivial". You are Undertaking a Journey of Great Importance. Such Incredible Importance. No Journey Will EVER be as IMPORTANT as this one (and nothing this narrator says will sound so distinctly... orange again). You are implored to cooperate with Macaque, for his wrath (and joblessness) are unending. There is no room for error or incompetence. Lousiness shall be met with the full force of the law.

Macaque is given an integer $ x $ . Your task is to choose an integer $ y $ such that the value of $ \operatorname{min}(x, y) $ $ ^{\text{∗}} $ is maximized.

If there are multiple valid $ y $ , you may output any of them.

$ ^{\text{∗}} $ $ \operatorname{min}(x, y) $ is defined as the minimum of integers $ x $ and $ y $ .

输入格式

Each test contains multiple test cases. The first line contains the number of test cases $ t $ ( $ 1 \le t \le 6767 $ ). The description of the test cases follows.

The only line of each test case contains a single integer $ x $ ( $ -67 \le x \le 67 $ ).

输出格式

For each test case, output one integer $ y $ ( $ -67 \le y \le 67 $ ) such that $ \min(x, y) $ is maximized.

输入输出样例

  • 输入#1

    3
    1
    3
    5

    输出#1

    2
    4
    6

说明/提示

In the first case, $ 2 $ is a possible answer because $ \min(1, 2) = 1 $ , which can be shown to be maximal.

输入解题思路,AI测评打分。不知道怎么写?

首页