All Tracks Problem

Buying Candies
Tag(s):

Very-Easy

Problem
Editorial
Analytics

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 ≤ N\(10^{5}\)

SAMPLE INPUT
2
12
15
SAMPLE OUTPUT
26
34
Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: Bash, C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, TypeScript, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

This Problem was Asked in

National Institute of Technology Jalandhar

Challenge Name

Sprint Challenge 1

OTHER PROBLEMS OF THIS CHALLENGE
通知
View All Notifications

?