Can you Guess ?

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

Comments

Popular posts from this blog

MySQL Multi Source Master Slave Replication using GTID

Setting Up PostgreSQL Logical Replication with Docker Compose

Access and modify all the resources of our Wiki.js using WikiJS API