Buying Candies

0

0 votes
Very-Easy
Problem

A Shop sells candies in a weird way. If you buy X candies, they charge you X*num_divisors(X), where num_divisors(X) is the number of distinct divisors of X.
You need to buy candies for N kids by spending minimum money ( you should buy at least N candies ) . Print minimum money you should spend.

Input Format:-
First line will contain an integer T denoting the number of testcases.
Each test case will contain a single integer N denoting the number of kids.

Output Format:-
Output a single integer per test case in new line denoting the minimum cost.

Constraints:-
1 ≤ T ≤ 100
1 ≤ N105

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?