Odd Pairs CodeChef Solution

We Are Discuss About CODECHEF SOLUTION

Odd Pairs CodeChef Solution

Odd Pairs CodeChef Solution

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Problem

Given an integer N, determine the number of pairs (A, B) such that:

  • 1 \leq A, B \leq N;
  • A + B is odd.

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • Each test case consists of a single integer N.

Output Format

For each test case, output the number of required pairs.

Constraints

  • 1 \leq T \leq 100
  • 1 \leq N \leq 10^9
Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Sample 1:

Input

Output

5
1
2
3
100
199
0
2
4
5000
19800

Explanation:

Test case 1: There are no pairs satisfying the given conditions.

Test case 2: The pairs satisfying both conditions are: (1, 2) and (2, 1).

Test case 3: The pairs satisfying both conditions are: (1, 2), (2, 1), (2, 3), and (3, 2).

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

 

SOLUTION

 Odd Pairs CodeChef Solution

Yhaa You have done it but next? if YOU Want to Get Others Please Visit Here JOIN NOW

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *