All Tracks Math Number Theory Basic Number Theory-1 Problem

Can you Guess ?
Tag(s):

Very-Easy, Very-Easy

Problem
Editorial
Analytics

No problem statement.

Find the logic from the given sample input/output.

And answer Q queries.

Constraints :

1 <= Value <= 100000

1<=nunber of query<=10000

SAMPLE INPUT
8
10
30
45
9
69
77
127
150
SAMPLE OUTPUT
8
42
33
4
27
19
1
222
Time Limit: 2.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: C, C++, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Scala 2.11.8, Swift, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

Notifications
View All Notifications