Examples:

**Input :** n = 54
**Output :** 232
Divisors of 54 = 1, 2, 3, 6, 9, 18, 27, 54.
Sum of divisors of 1, 2, 3, 6, 9, 18, 27, 54
are 1, 3, 4, 12, 13, 39, 40, 120 respectively.
Sum of divisors of all the divisors of 54 =
1 + 3 + 4 + 12 + 13 + 39 + 40 + 120 = 232.

**Input : **n = 10
**Output :** 28
Divisors of 10 are 1, 2, 5, 10
Sums of divisors of divisors are
1, 3, 6, 18.
Overall sum = 1 + 3 + 6 + 18 = 28

**Input:**

The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains an integer n.

**Output:**

For each test case in a new line print the required output.

**Constraints:**

1<=T<=100

1<=n<=100

**Example:
Input:**

2

54

10

232

28

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.

ShubhamJain18 | 205 |

makeitdonesolo | 140 |

lost_found | 124 |

maggiiiii | 118 |

SahatPrasad1 | 108 |

Bishnu Dev Panda | 777 |

okayboss | 551 |

ShubhamJain18 | 516 |

yk12 | 514 |

makeitdonesolo | 480 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.