Find sum of even factors of a number
Submissions: 2131   Accuracy:

53.19%

  Difficulty: Basic   Marks: 1

Given a number n, the task is to find the even factor sum of a number.

INPUT : The first line consists of an integer T i.e. the number of test cases. First and last line of each test case consists of an integer n.

OUTPUT : Print the sum of even factors of the given integer n.

CONSTRAINTS :
1<=T<=100
1<=n<=105

EXAMPLES:
INPUT :

2
30
18

OUTPUT : 
48
26

EXPLANATION :
 

Input : 30
Output : 48
Even dividers sum 2 + 6 + 10 + 30 = 48

Input : 18
Output : 26
Even dividers sum 2 + 6 + 18 = 26

** For More Input/Output Examples Use 'Expected Output' option **

Author: saksham0751


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.