All Tracks Math Number Theory Basic Number Theory-2 Problem

E. Bet
Tag(s):

Medium, Prime Factorization

Problem
Editorial
Analytics

King has just won a bet with Saitama (which everyone already knew he would). So as per the rules of the bet Saitama is going to give King \(m\) times the amount King bet, where \(m\) is the number of factors of the amount King bet. If King had \(n\) units of money before the bet then what is the maximum money he can have after the bet?

NOTE: King doesn't have to put all his money in the bet.

Input

First line contains an integer \(T\), the number of test cases.

\(T\) lines follow, each containing a single integer \(n\) - the amount King had before the bet.

Output

Your output should contain \(T\) lines, each showing the maximum money that King can have after the bet.

Constraints

\(1 \le T \le 10 ^ 5\)

\(1 \le n \le 10 ^ 6\)

SAMPLE INPUT
5
2
4
9
15
50
SAMPLE OUTPUT
4
12
33
75
482
Time Limit: 0,7 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

Уведомления
View All Notifications

?