## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

## [Solution] Gcd and Lcm CodeChef Solution | CodeChef Problem Solution 2022

You are given an integer $N$.

You are asked to find total number of integer pairs $\left(A,B\right)$ such that

• $1\le A,B\le N$
• ${A}^{2}+{B}^{2}+gc{d}^{2}\left(A,B\right)+lc{m}^{2}\left(A,B\right)=N$. Note that $gc{d}^{2}\left(A,B\right)$ and $lc{m}^{2}\left(A,B\right)$ denote the square of gcd and the square of lcm of numbers $A$ and $B$ respectively.

### Input Format

• The first line of input contains a single integer $T$, denoting the number of test cases. The description of $T$ test cases follows.

Solution Click Below:-  👉
👇👇👇👇👇

• The only line of each test case contains an integer $N$.

### Output Format

For each test case, output in a single line, number of valid pairs $\left(A,B\right)$.

Fitness CodeChef Solution

Complementary Strand in a DNA CodeChef Solution

Make all equal using Pairs Codechef Solution

Count the ACs CodeChef Solution

Strong Elements CodeChef Solution

Reversal Sorting CodeChef Solution

AP Grid CodeChef Solution

Gcd and Lcm CodeChef Solution

The Subarray XOR CodeChef Solution

### Constraints

• $1\le T\le {10}^{5}$
• $4\le N\le {10}^{10}$